The following table lists typical XPath expressions and provides an example for each expression.
XPath Expression |
Meaning |
Example |
---|---|---|
|
Caption from CI |
|
|
Caption from CI |
|
|
Caption of the root (database) CIs |
|
|
Selects the caption from the parent of the parent CI |
|
|
Selects the parent relation type |
|
|
Selects the parent of the parent type |
|
|
Selects type of the root CI |
|
|
Selects the caption of all CIs of type |
|
|
Selects the caption of all CIs with a |
|
|
Selects the caption of all CIs that have dependencies |
|
Note: If the Xpath expression selects a node below the starting database node, the “..
” reads back one step. The following expression reads down to the node db
and then links back to the starting database node.
//dependencies[type='hosted_on']/CI/../..
However, if the node db
is the starting node, the expression ../..
follows the containment links of the node db
, which is not the dependency relation that is shown in this example. The result depends on the parent container of the node, which is a different hierarchy.