Click to return to the XML (Extensible Markup Language) home page    
XMLDOMNode namespaceURI P...     XMLDOMNode nodeName Prope...     XMLDOMNode Object    
Web Workshop  |  XML (Extensible Markup Language)

nextSibling Property


Contains the next sibling of this node in the parent's child list.

Syntax

objXMLDOMNode = oXMLDOMNode.nextSibling

Remarks

Object. The property is read-only. It returns the right sibling of this node.

This value depends on the value of the nodeType property.

NODE_ATTRIBUTE,
NODE_DOCUMENT,
NODE_DOCUMENT_FRAGMENT
Always returns null; these node types do not appear as children of any other nodes.
NODE_CDATA_SECTION,
NODE_COMMENT,
NODE_DOCUMENT_TYPE,
NODE_ELEMENT,
NODE_ENTITY,
NODE_ENTITY_REFERENCE,
NODE_NOTATION,
NODE_PROCESSING_INSTRUCTION,
NODE_TEXT
Returns the node immediately following this node in the list of children of this node's parent. If no such node exists, returns null.

Example

The following VBScript example creates an XMLDOMNode object and sets it to the next sibling of the current node:

Dim xmlDoc
Dim currNode
Dim nextNode

Set xmlDoc = CreateObject("microsoft.xmldom")
xmlDoc.async = False
xmlDoc.load("c:\books.xml")
Set currNode = xmlDoc.documentElement.childNodes.item(0)
Set nextNode = currNode.nextSibling
MsgBox nextNode.xml

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
XMLDOMAttribute, XMLDOMCDATASection, XMLDOMCharacterData, XMLDOMComment, XMLDOMDocument, XMLDOMDocumentFragment, XMLDOMDocumentType, XMLDOMElement, XMLDOMEntity, XMLDOMEntityReference, XMLDOMNode, XMLDOMNotation, XMLDOMProcessingInstruction, XMLDOMText, XTLRuntime


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.