Java Reference
In-Depth Information
The
previousSibling
property returns the previous adjacent node. It will return
null
if the node is the first child of that parent:
bike.previousSibling
<< #text "
"
Once again, these methods find the next and previous
node
, not element, so they will often
return a blank text node as in the examples above.
Using these properties allows you to navigate around the whole of the document tree.