XPath Has Two Main Uses
- First use: Addressing
- addresses (finds) part of an XML document
- can address any part of the tree from any other
- (ask for something in an XML document (“gimme my footnote!”)
... and get it back)
- Second use in XSLT: for Testing/Matching
- test whether a node in a tree matches a pattern
- is this node a paragraph that is inside a footnote that has an attribute called “footnote-type” with the value “legal”?