This dialog box allows to select nodes specified using an XPath expression. This dialog box has a Simple tab which allows to perform most common search tasks without having to learn XPath. Arbitrarily complex XPath expressions are specified using the Advanced tab.
The search starts at explicitly selected node, if any, and at implicitly selected element otherwise.
Example 1: find element having attribute id
equals to introduction
:
Select "Element field is empty.
". Make sure theCheck id
" in the text field. Select " ". Type "introduction
" in the next text field.
Make sure
is not checked.Click
.Example 2: navigate from element para
to next element para
:
Click at the very beginning of your document.
Select "para
" in the Element field.
Make sure
is not checked.Make sure
is not checked.Click
.Press Ctrl+A (command Find Element is repeatable) to move to next para
, if any.
Example 3: find element html:pre
having a class
attribute and containing some text matching regular expression "print\w+\(
":
Select "html:pre
" in the Element field.
If the namespace corresponding to prefix "html
" is the default namespace of the document, it is also possible to simply type "pre
".
Check class
" in the text field. Make sure the next text field is empty.
Check print\w+\(
" in the text field.
Click
.Specify an XPath expression in the corresponding text field.
This expression is evaluated in the context of the explicitly selected node, if any, and in the context of the implicitly selected element otherwise.
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.