Skip to main content

Module node_ops

Module node_ops 

Source
Expand description

Node operations for XPath evaluation.

This module implements XPath 2.0 node comparison and navigation operations:

  • is (node identity)
  • << (precedes in document order)
  • >> (follows in document order)
  • Root navigation

Functionsยง

are_siblings
Check if two nodes are siblings (same parent).
compare_document_order
Compare two nodes by document order.
context_node
Get the context node from an optional context.
following_node
Check if node a follows node b in document order.
get_root
Get the root node from a given node.
is_ancestor
Check if node ancestor is an ancestor of node descendant.
is_descendant
Check if node descendant is a descendant of node ancestor.
is_root
Check if a node is the document root.
preceding_node
Check if node a precedes node b in document order.
same_node
Check if two nodes are identical (same node).