previous_sibling method

previous_sibling

Moves the TreeWalker to the previous sibling of the current node, and returns the new node. If the current node has no visible previous sibling, returns null, and retains the current node.

Returns

The new node, or null if the current node has no previous sibling. in the TreeWalker’s logical view.

def previous_sibling(self):
    ...

See Also