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

XPath Concepts

In this section, we will review the way in which an XPath processor views an XML document.

XML Documents as Trees

An XML document simply consists of a series of characters. The use of characters to create the logical structure for that document is constrained by the rules of XML 1.0. In XML 1.0 syntax, we might have elements nested within each other, as shown in the following code snippet:

<AnElement> 
 <AnotherElement>
  <!-- Some more content -->
 </AnotherElement>
</AnElement>

The outermost element can also be viewed in the XPath data model as a node from which branches can spread out. The AnElement element is, in the XPath data model, represented by an element node—the AnElement element node. The AnotherElement element node is ...

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