XPath

Jump to navigation Jump to search

Definition

XPath is a language that allows you to identify any node in an XML document. It is used by XSLT (a transformation language) and [[XQuery], a query language. Path gets its name from its use of a path notation for navigating through the hierarchical structure of an XML document. XPath uses a compact, non-XML syntax to facilitate use of XPath within URIs and XML attribute values.

XPath 2.0 is an expression language that allows the processing of values conforming to the data model defined in XQuery/XPath Data Model (XDM). The data model provides a tree representation of XML documents as well as atomic values such as integers, strings, and booleans, and sequences that may contain both references to nodes in an XML document and atomic values. The result of an XPath expression may be a selection of nodes from the input documents, or an atomic value, or more generally, any sequence allowed by the data model. The name of the language derives from its most distinctive feature, the path expression, which provides a means of hierarchic addressing of the nodes in an XML tree (http://www.w3.org/TR/xpath20/), retrieved 17:01, 25 November 2007 (MET)

See XPath tutorial - basics.

Software

  • All XSLT and XQuery processors implement XPath.
  • Php DOM implements XPath

Links

Standards

Overviews


Warning-noto.svg

Content of this article has been taken from EduTechWiki (en) or EduTechWiki (fr) at the date indicated in the history. DKS was the main founder and main contributor of EduTechWiki. If you cite this page you also must cite and credit EduTechWiki, according to the CC BY-NC-SA license. View the pageinfo-toolboxlink for this article.