Use XPath Axis and Wildcard Expressions in the Expression Builder
You can include XPath axis and wildcard expressions in actions that support the Expression Builder (for example, assign and switch actions support the Expression Builder).
-
Create an assign action or switch action and navigate to the Expression Builder.
-
For an assign or switch action, build an expression using either option:
-
Wildcard expression:
For this example, a wildcard is entered to select all elements:
.Answer/nssrcmpr:process/nssrcmpr:Answer/*Or, to select all elements:
/* -
Axis expression:
For this example,
is entered to select all descendants (child, grandchildren, and so on) of the current node. Any descendant with this ID and namespace:descendant
is retrieved by the expression.mb_v1_3:ID/nssrcmpr:process/nssrcmpr:Answer/descendant::mb_v1_3:IDAxis expressions adhere to the following syntax:
axisname::nodetest[predicate]The following table provides examples of axis expressions:
Syntax Result child::bookSelects all
booknodes that are children of the current node.attribute::langSelects the
langattribute of the current node.child::*Selects all element children of the current node.
attribute::*Selects all attributes of the current node.
child::text()Selects all
textnode children of the current node.child::node()Selects all children of the current node.
descendant::bookSelects all
bookdescendants of the current node.ancestor::bookSelects all
bookancestors of the current node.ancestor-or-self::bookSelects all
bookancestors of the current node and the current if it is abooknode.child::*/child::priceSelects all
pricegrandchildren of the current node.
-