XPath Nodes
An XPath expression can select the following types of nodes.
Node | Description | Example |
---|---|---|
Root | Root element node of an XML document. | /* |
Element | Element node | /item |
Attribute | Attribute node | /item/@price |
Text | Text or CDATA node inside an element. | /item/text() |
Comment | Comment node inside an element | /item/comment() |
Processing Instruction | Processing Instruction | /processing-instruction('xml-stylesheet') |
Node | Any type of node | /item/node() |