HP e-CommerceXML Accelerator sa7150 User Manual
Page 31

C H A P T E R 3
XML Operations
21
An XML expression’s first element must be preceded by a step
operator.
The node to the left of the last step operator in an XML expression is
the “context node,” i.e., the node that establishes the level within the
XML data tree’s hierarchy at which the SA7150 searches for a match
when comparing XML data to XML expressions. The “root node” is
the top level of the XML data tree, and by implication is to the left of
an XML expression’s left-most step operator. Some examples of the
effects of step operators are:
•
//address
Tells the SA7150 to search for the
element anywhere in the XML data tree.
•
//employee//state
Tells the SA7150 to search anywhere
under the
element node for the
element.
•
//employee/address
Tells the SA7150 to search one level
below the
node for the
element.
You can specify an element as “*”, which selects any element relative
to the context node. You can also specify an optional filter at the end
of a path to further refine parsing of the XML data stream.
Step
Operator
Name
Description
/
Child
operator
Selects all immediate children of the context node
//
Descendant
operator
Selects elements at any level under the context node
XML Step Operators