Wednesday, August 16th, 2017

XPath

0

XPath

XPath derived as XML Path Language is a query language is used to navigate through elements and attributes in an XML document. It contains a library of standard functions. XPath is a major element in World Wide Web Consortium (W3C) recommendation. XPATH is designed to be used by both XSLT standard and XPointer. It support primary facilities for manipulation of strings, numbers and booleans.

XPath models an XML document as a tree of nodes. There are different types of nodes, including element, attribute, text, namespace, processing-instruction, comment, and document nodes.
For example, the expression book/author will return a node-set of the <author> elements contained in the <book> elements, if such elements are declared in the source XML document. In addition, an XPath expression can have predicates (filter expressions) or function calls. For example, the expression book[@type="Fiction"] refers to the <book> elements whose type attribute is set to “Fiction”.

XPath expressions

  • Hierarchy comprised of elements and other nodes in an XML document.
    Element names at each level might not be unique. XPath expressions identify a set of all the matching elements.
    Evaluated relative to a particular node called the “context” for the expression.

XPath standard functions

XPath includes over 100 built-in functions. There are functions for string values, numeric values, date and time comparison, node and QName manipulation, sequence manipulation, Boolean values, and more.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • RSS
  • Technorati
  • Twitter

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

Secure Linux Web Hosting