All valid XPath queries that are sent to the XML parser must be written in a subset of the XPath language using opaque terms. Opaque terms are not parsed by the linguistic text search parser.
@xpath:'query'where query is the text shown in the examples in the following table.
| Query | Description |
|---|---|
| /sentences | Any document with a top-level tag called sentences. |
| //sentences | Any document with a tag at any level called sentences. |
| /sentence/paragraph | Any document with a top-level tag sentence having a direct child tag paragraph. |
| /sentence/paragraph/ | Any document with a top-level tag sentence having a direct child tag paragraph. |
| /book/@author | Any document with a top-level book tag having an attribute author. |
| /book//@author | Any document with a top-level book tag having a descendant tag at any level with the attribute author. |
/book[@author contains("barnes") |
Any document with a top-level book tag with an author attribute containing "barnes" (normalized) and a title attribute that only contains the words "the," "lemon" and "table" (normalized in that order). |
/book[@author |
Any document with a top-level book tag with the specified author attribute and either of the two specified title attributes. |
/book[@publishDate > xs:date("2000-01-01")]![]() |
Top level tag is book and book has
an attribute PublishDate that is greater than the date of 2000-01-01.![]() |
/book[purchaseTime > xs:dateTime("2009-05-20T13:00:00")]![]() |
Top level tag is book. book has
a direct child purchaseTime that is a DateTime expression greater
than 2009-05-20T13:00:00.![]() |
/program[. contains("""hello, |
Any document with a top-level program tag containing both the tokens hello and world (normalized) in that order and in consecutive positions. |
/book[paragraph |
Any document with a top-level book tag with a direct child tag paragraph containing "foo" and, referring to the book tag, having a descendant tag sentence at any level. |
| /auto[@price < 30000.] | Any document with a top-level auto tag having an attribute price with a numeric value that is less than 30000. |
| //microbe[@size < 3.0e-06] | Any document containing a microbe tag at any level with a size attribute with a value that is less than .000003. |