Tree navigation
Following the document hierarchy: “.”
- “.” explores the immediate children of a node
- useful for limited nested structures
-
Following the document flow: “->”
- “->” explores the nodes found along a depth-first search
- useful to create shortcuts
- “->” only stops when it reaches the end
-
When accessing nodes, index ranges can be used
- e.g.. html.body->a[*].txt
- e.g.. html.body.table[0].tr[1-].td[0].txt
- returns a collection of nodes