I'm having trouble figuring out how to read and write xml, could someone possible provide sample xml and code to parse it so I can understand it more? Is it possible to parse the xml from a textbox?
Printable View
I'm having trouble figuring out how to read and write xml, could someone possible provide sample xml and code to parse it so I can understand it more? Is it possible to parse the xml from a textbox?
Of course you would want to use proper error handling in the event an error were to occur.Code:'write out
Dim myXMLDocument As XDocument = XDocument.Parse(TextBox1.Text)
myXMLDocument.Save("C:\somefile.xml")
'read in
TextBox1.Text = XDocument.Load("C:\somefile.xml").ToString