PreviousSibling - cXMLDOMAttribute

Returns a handle to the previous sibling of this node in the parent's child list

Type: Function

Return Data Type: Handle

Parameters: None

Return Value

Returns an object handle to the next node, zero if no more nodes.


Syntax
Function PreviousSibling Returns Handle

Call: Get PreviousSibling to HandleVariable


Description

PreviousSibling returns a handle to the previous sibling of this node in the parent's child list. The message is sent to the child objects (i.e. the siblings - not the parent)

Handle hoNode hoPreviousNode
Get LastChild of hoRoot to hoNode // get the last node
While (hoNode<>0)
    Send ShowInformation hoNode
    Get PreviousSibling of hoNode to hoPreviousNode // now get previous sibling node
    Send Destroy of hoNode     // Important: get rid of the previous node object
    Move hoPreviousNode to hoNode
Loop

See Also

FirstChild | PreviousSibling | NextSibling