Hi, I’m trying to develop a VB.NET application (Original application Developed in PHP) to create XML data that will be used within a PHP application.
I’ve been able to use, but it has not been able to do what I need
textWriter.WriteStartDocument()
textWriter.WriteStartElement("selftestQuestion") 'START Question Element
I need it to produce a Element Tag that look like below, but I can’t seem to use WriteStartElement to do this.
.........
Is there any other VB.Net function that can be used to write XML that allows me to insert more data into the Element Start tag
Thanks
Bechir BejaouiPosted Apr 24, 2008, 7:10 PM
Dim Writer As System.Xml.XmlTextWriter = New System.Xml.XmlTextWriter("C:\File.xml", New System.Text.UTF8Encoding())
Writer.WriteStartElement("x", "root", "urn:1")
Writer.WriteStartElement("x", "item", "urn:1")
Writer.WriteEndElement()
Writer.WriteEndElement()
Writer.Close()
MsgBox("Done")
you can use simply the XmlDocument as follow
Dim doc As System.Xml.XmlDocument = New Xml.XmlDocument()
doc.LoadXml(("
doc.Save("C:\FileName.xml")
use Load method to charge a given xml file into the xml document if you want to obtain a given xml file content