OK, here is an example, if you have something more specific let me know.
Code:
Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click
Dim sXML As String = "<?xml version=""1.0"" encoding=""utf-8"" ?>"
sXML = String.Concat(sXML, Environment.NewLine, "<Root>")
sXML = String.Concat(sXML, Environment.NewLine, " ", "<One />")
sXML = String.Concat(sXML, Environment.NewLine, " ", "<Two />")
sXML = String.Concat(sXML, Environment.NewLine, " ", "<Three />")
sXML = String.Concat(sXML, Environment.NewLine, "</Root>")
Dim clsDocument As New XmlDocument
clsDocument.PreserveWhitespace = True
clsDocument.LoadXml(sXML)
For i As Integer = 1 To 10
clsDocument.SelectSingleNode("//Two").AppendChild(clsDocument.CreateElement("x" & i.ToString))
Next
clsDocument.SelectSingleNode("//One").Attributes.Append(clsDocument.CreateAttribute("test"))
clsDocument.Save("your.xml")
End Sub
Bookmarks