I searched the net and the forums, but have not seem true XML examples. Is there a way to save the data from text boxes as XML and then load them back? Examples would be great.
Thanks!
Printable View
I searched the net and the forums, but have not seem true XML examples. Is there a way to save the data from text boxes as XML and then load them back? Examples would be great.
Thanks!
Can you be a bit more specific.
Check out the following threads for examples of working with XMLs
http://www.vbforums.com/showthread.p...ument+examples
http://www.vbforums.com/showthread.p...ument+examples
Thanks. I got one of those examples to work using this:
Added a reference to MSXML version 6.
My xml file located at c:\test.xml
My vb code:Code:<COMMAND>
<WHOIS>
<NAME>That is me</NAME>
</WHOIS>
</COMMAND>
Code:Private Sub Form_Load()
Dim docFile As New DOMDocument30
Dim docParent As IXMLDOMNode
Dim docName As IXMLDOMNodeList
Dim intIndex As Integer
docFile.Load "C:\test.xml"
Set docParent = docFile.documentElement.selectSingleNode("WHOIS")
Set docName = docParent.selectNodes("NAME")
Debug.Print "test"
For intIndex = 0 To docName.length - 1
Debug.Print docName(intIndex).Text
Next
Set docParent = Nothing
Set docName = Nothing
End Sub
Ultimately, I am trying to save textbox values to an XML file so that I can recall or load them back in later on.
The above may get me going to load XML in.
Ideas or samples on getting it out?
Thanks!
Oops... found one here that might get me going.
Thread