Contains the left sibling of this node.
objXMLDOMNode = oXMLDOMNode.previousSibling
Object. The property is read-only.
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 preceding this node in its parent's child list. Returns Null if no such node exists. |
The following VBScript example creates an XMLDOMNode object and sets it to the previous sibling of the current node:
Dim xmlDoc Dim currNode Dim prevNode Set xmlDoc = CreateObject("Msxml2.DOMDocument") xmlDoc.async = False xmlDoc.load("c:\books.xml") Set currNode = xmlDoc.documentElement.childNodes.item(1) Set prevNode = currNode.previousSibling MsgBox prevNode.xml
Applies To: XMLDOMAttribute Object | XMLDOMCDATASection Object | XMLDOMCharacterData Object | XMLDOMComment Object | DOMDocument Object | XMLDOMDocumentFragment Object | XMLDOMDocumentType Object | XMLDOMElement Object | XMLDOMEntity Object | XMLDOMEntityReference Object | XMLDOMNode Object | XMLDOMNotation Object | XMLDOMProcessingInstruction Object | XMLDOMText Object | XTLRuntime Object