111. xpathSearch

Parameter syntax:

[ implicit_selection ]? [ XPath_expression ]?

Evaluates specified XPath 1.0 expression in the context of selected node.

The evaluation of the XPath expression must return a nodeset. If this nodeset exclusively contains contiguous siblings, all the nodes in the nodeset are selected. Otherwise, first node (in document order) of the nodeset is selected.

If the evaluation of the expression returns attributes, the corresponding elements are selected.

It is not possible to select the document node or sibling nodes of the root element.

Note that for this command, implicit_selection defaults to [implicitNode].

If XPath_expression is not specified, a dialog box is displayed. This dialog box may be used to specify arbitrarily complex XPath 1.0 expressions.

When this command is used interactively, qualified names found in the XPath expression may be specified using the namespace prefixes defined in the document. Note that for a greater ease of use, the default namespace if any is also considered when parsing element names. DocBook 5 example: following::para is equivalent to following::db:para.

When this command is used in an XXE configuration file, namespace prefixes may be different in the configuration file and in the document being edited so it's safer to use the {namespace_URI}local_part notation.


xpathSearch [implicitNode]
xpathSearch //@revisionflag
xpathSearch [implicitElement] preceding::li
xpathSearch [implicitElement] following::xs:complexType[1]
xpathSearch [implicitElement] following::{http://www.w3.org/2001/XMLSchema}complexType[1]