O'Reilly logo

Oracle Database 11g: Building Oracle XML DB Applications by Jinyu Wang

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 Basics

XPath expressions navigate and retrieve XML content similar to traversing a file system’s directory structure, except that XPath works on an XML document tree (also called XML DOM tree).

In XPath, the root node of an XML document is defined as a slash (/). Then, a location path, which is another slash (/) along with the element’s name, steps down the XML DOM tree and selects the specified XML element. For example, the XPath expression /contact returns the <contact> element. The /contact/first_name returns the <first_name> element, which is a child element of <contact>.

The most important type of XPath expressions is the location path, which consists of a sequence of location steps. Each step has three components: an axis, a node ...

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