Wednesday, 4 February 2015

Xpath Expressions

XPath uses path expressions to select nodes or node-sets in an XML document.

In XPath, there are seven kinds of nodes: element, attribute, text, namespace, processing-instruction, comment, and document nodes.

XML documents are treated as trees of nodes. The topmost element of the tree is called the root element.

/ -->Selects from the root node

// -->Selects nodes in the document from the current node that match the selection               no matter where they are

. -->Selects the current node

.. -->Selects the parent of the current node

@ -->Selects attributes

No comments:

Post a Comment