Chapter 2. The XPath Data Model

Understanding the XPath 1.0 Data Types

To let you work with the contents of an XML document, XPath lets you model the data in that document in a specific way called the data model. The data model specifies how XPath sees a document, and that's essential to know if you want XPath to find the data you're looking for.

For example, if you have an XML document and want to pick out all the <friend> elements, you need to know how XPath sees that document to be able to instruct it to do what you want. In this chapter, we're going ...

Get XPath: Navigating XML with XPath 1.0 and 2.0 Kick Start now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.