XPath Expression Results View
When you run an XPath expression, Oxygen XML Developer displays the results of its execution in the Results view.
- Description - The result thatOxygen XML Developer displays when you run an XPath expression.
- XPath location - The path to the matched node.
- Resource - The name of the document that you run the XPath expression on.
- System ID - The path to the document itself.
- Location - The location of the result in the document.
- /node[value]/node[value]/node[value] -
The Results view also includes various toolbar and contextual menu actions. For more information, see Results View.
Example:
The following snippets are taken from a DocBook book based on the DocBook XML DTD. The book
contains a number of chapters. To return all the chapter nodes of the book, enter
//chapter
in the XPath expression field and press
Enter. This action returns all the
chapter
nodes of the DocBook book in the Results
View. Click a record in the Results View to locate and
highlight its corresponding chapter element and all its children nodes in the document you are
editing.
To find all example
nodes contained in the sect2
nodes of a
DocBook XML document, use the following XPath expression:
//chapter/sect1/sect2/example
. Oxygen XML Developer adds a result in the
Results View for each example
node found in any
sect2
node.
- /chapter[1]/sect1[3]/sect2[7]/example[1]
it means that in the edited file, the example
node is located in the first
chapter, third section level one, seventh section level 2.