O'Reilly logo

Special Edition Using XML, Second Edition by - et al. David Gulbransen

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

What Is XPointer?

XPointer is a language to be used with XML but, like XPath, is not written in XML. XPointer allows us to address fragments of an XML document. You might already be familiar with fragment identifiers in HTML/XHTML. Let's briefly look at a simple use of HTML/XHTML fragment identifiers to remind you how they work and also to examine their limitations.

To look at that, we need to create two simple XHTML files. The first, Listing 12.1, will contain a truncated table of contents for this book, and the second page, Listing 12.2, will contain a highly abbreviated version of some text representing the content of the book.

Listing 12.1. A Simplified Table of Contents for This Book in XHTML (TOC.html)
 <!DOCTYPE html PUBLIC "-//W3C//DTD ...

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