O'Reilly logo

Sams Teach Yourself XML in 10 Minutes by Andrew H. Watt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required