Returns the next sibling node of the current node.
…xmlnode_object.NextSibling
Prerequisites
None
Parameters
None
Remarks
This method returns a new XmlNode object that corresponds to the next sibling of the current node. If there is no next sibling, the returned object is Nothing. A sibling is a node that has the same parent as the current node. The order of siblings corresponds to the order of data items in the XML text document. This method does not create a new node in the DOM tree.
Examples
Dim doc As XmlDoc
Dim root As XmlNode
Dim elem1 As XmlNode
Dim elem2 As XmlNode
doc = New XmlDoc("my_doc")
root = doc.DocumentElement
elem1 = root.AddElementNode("section1", "Data for section 1")
elem2 = root.AddElementNode("section2", "Data for section 2")
Console.Writeline(elem1.NextSibling.Name) ' Displays "section2"
See Also
XML Classes | xmlnode_object.ParentNode| xmlnode_object.PreviousSibling