Home >Online Product Documentation >Table of Contents >XPath Abbreviations Quick Reference
Table 104 defines the abbreviations you can use in XPath expressions:
The child axis is assumed. For example, the following two XPath expressions both return the para children of chapter children of the context node:
child
para
chapter
chapter/para child::chapter/child::para
@
The attribute axis. For example, the following two XPath expressions both return para children of the context node that have type attributes with a value of warning:
attribute
type
warning
para[@type="warning"] child::para[attribute::type="warning"]
//
descendant-or-self
//para /descendant-or-self::node()/child::para
/descendant::para[1] //para[1]
.
self::node()
.//para self::node()/descendant-or-self::node()/child::para
..
parent::node()
title
../title parent::node()/child::title
Table 105 shows examples of abbreviations in XPath expressions
*
true
*/para
para[1]
para[last()]
/doc/chapter[5]/section[2]
section
doc
para[@type="warning"]
para[@type="warning"][5]
para[5][@type="warning"]
chapter[title]
//para
chapter//para
//olist/item
item
olist
.//para
@*
@name
name
../@name