Hello all,
I have a problem with a program i'm trying to write.
I only need 1 more thing to make it work properly, the textboxes that are filled in must be added or overwritten in an existing XML file.
I know i need to work with XMLWriter, but i have no idea about the code.
This is what i have right now.
'Set up the XmlWriter settings.
Dim settings As New XmlWriterSettings()
settings.Indent = True
' Initialize the XmlWriter.
Dim XmlWrt As XmlWriter = XmlWriter.Create(Application.StartupPath & "XmlTest.xml", settings)
With XmlWrt
' Write the Xml declaration.
.WriteStartDocument()
' Write the root element.
.WriteStartElement("clients")
' Start our first Client.
.WriteStartElement("clients")
' Give this person the attribute ID of 1.
.WriteAttributeString("ID", "1")
' The person nodes.
.WriteStartElement("name")
.WriteValue(strKlant)
.WriteEndElement()
.WriteStartElement("sender")
.WriteValue(strSender)
.WriteEndElement()
.WriteStartElement("errorwords")
.WriteValue(strError)
.WriteEndElement()
.WriteStartElement("falsewords")
.WriteValue(strFalse)
.WriteEndElement()
.WriteStartElement("link")
.WriteValue(strLink)
.WriteEndElement()
.WriteStartElement("days")
.WriteValue(strDays)
.WriteEndElement()
.WriteStartElement("active")
.WriteValue(strActive)
.WriteEndElement()
' The end of this person.
.WriteEndElement()
' Close the XmlWriter.
.WriteEndDocument()
.Close()
Can someone please help me?