Document.documentnode.selectnodes hướng dẫn
XPath uses path expressions to select nodes or node-sets in an XML document. The node is selected by following a path or steps. The XML Example DocumentWe will use the following XML document in the examples below.
Selecting NodesXPath uses path expressions to select nodes in an XML document. The node is selected by following a path or steps. The most useful path expressions are listed below:
In the table below we have listed some path expressions and the result of the expressions:
PredicatesPredicates are used to find a specific node or a node that contains a specific value. Predicates are always embedded in square brackets. In the table below we have listed some path expressions with predicates and the result of the expressions:
Selecting Unknown NodesXPath wildcards can be used to select unknown XML nodes.
In the table below we have listed some path expressions and the result of the expressions:
Selecting Several PathsBy using the | operator in an XPath expression you can select several paths. In the table below we have listed some path expressions and the result of the expressions:
|