O'Reilly logo

Sams Teach Yourself XML in 10 Minutes by Andrew H. Watt

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

The XML Path Language (XPath) also models an XML document as a set of nodes. However, the hierarchy of nodes in the XPath representation of an XML document differs in several respects from the DOM representation.

XPath uses a path syntax to express the hierarchy of the content in an XML document. XPath bears similarities to the paths—hence the name XML Path Language—used to express the hierarchy of the file system on your computer.

The root node of an XPath document, which is equivalent to the document entity, is expressed as a single forward slash character (/). Nodes can then be accessed relative to the root node. For example, the document element of a document with a document element called myDocumentElement can be accessed using path ...

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