C H A P T E R 3
Step
Name
Operator
/
Child
operator
//
Descendant
operator
XML Operations
An XML expression's first element must be preceded by a step
operator.
Description
Selects all immediate children of the context node
Selects elements at any level under the context node
XML Step Operators
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 <address>
•
element anywhere in the XML data tree.
//employee//state Tells the SA7150 to search anywhere
•
under the <employee> element node for the <state>
element.
//employee/address Tells the SA7150 to search one level
•
below the <employee> node for the <address> 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.
21