Imports System
Imports System.Xml
Public Class Sample
Public Shared Sub Main()
Dim doc As New XmlDocument()
doc.LoadXml("<root><house id='1'/><house id='2' /></root>")
Console.WriteLine(doc.OuterXml) 'BEFORE
Dim node As XmlNode
For Each node In doc.SelectNodes("/root/house")
node.AppendChild(doc.CreateElement("rooms"))
Next node
Console.WriteLine(doc.OuterXml) 'AFTER
End Sub 'Main
End Class 'Sample
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"KathyB" <Ka**********@attbi.com> wrote in message
news:75**************************@posting.google.c om...
Hi,
I'm looking for an example (preferably vb) using xmlDocument class
that once an XmlNodeList has been set (e.g., select all <House>
elements), that would add an empty <Rooms> child element to each
<House>.
Thanks in advance for any help.
Kathy