In this section, we will review the way in which an XPath processor views an XML document.
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 ...