O'Reilly logo

Real World XML by Steven Holzner

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

Using XPointer Points

How do you define a point in the XPointer specification? To do so, you must use two items: a node and an index that can hold a positive integer or zero. The node specifies an origin for the point, and the index indicates how far the point you want is from that origin.

But what should the index be measured in terms of—characters in the document or number of nodes? In fact, there are two different types of points, and the index value that you use is measured differently for those types.

Node-Points

When the origin node, also called the container node, of a point can have child nodes (which means it's an element node or the root node), the point is called a node-point.

The index of a node-point is measured in child nodes. Here, ...

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