XPointer and XPath
XPath models an XML document as a hierarchy of nodes. XPointer incorporates the concept of a node and also makes use of XPath functions, some of which were discussed in Chapter 9.
The XPath notion of a node is generalized in XPointer to include the additional notions of a point and a range. The following XML code snippet can help illustrate these concepts.
<text>Here is some text.</text>
All the text between the start and end tags of the text element is the value of a corresponding text node. The point exactly between the initial H and the first e of Here is a point. That type of point is a character-point.
A range could be the text string is some, with the starting point between the space character and the initial i of ...
Get Sams Teach Yourself XML in 10 Minutes now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.