XPath

XPath

Infobox programming language
name = XPath
paradigm = query language
year = 1999
designer =
developer = W3C
latest_release_version = 2.0
latest_release_date = January 23 2007
typing =
implementations = JavaScript, C#, Java
dialects =
influenced_by = XSLT, XPointer
influenced = XML Schema, XForms
operating_system =
license =
website =

XPath (XML Path Language) is a language for selecting nodes from an XML document. In addition, XPath may be used to compute values (strings, numbers, or boolean values) from the content of an XML document. XPath was defined by the World Wide Web Consortium, W3C.

History

The XPath language is based on a tree representation of the XML document, and provides the ability to navigate around the tree, selecting nodes by a variety of criteria. In popular use (though not in the official specification), an XPath expression is often referred to simply as "an XPath".

Originally motivated by a desire to provide a common syntax and behavior model between XPointer and XSLT, subsets of the XPath query language are used in other W3C specifications such as XML Schema and XForms.

Versions

There are currently two versions in use.

XPath 1.0 became a Recommendation on 16 November 1999 and is widely implemented and used, either on its own (called via an API from languages such as Java, C# or JavaScript), or embedded in languages such as XSLT or XForms.

The current version of the language is XPath 2.0, which became a Recommendation on 23 January 2007. A number of implementations exist but are not as widely used as XPath 1.0. The XPath 2.0 language specification is much larger than XPath 1.0 and changes some of the fundamental concepts of the language such as the type system; the language specification is described in a separate article.

The most notable change is that XPath 2.0 has a much richer type system; XPath 2.0 supports atomic types, defined as built-in types in XML Schema, and may also import user-defined types from a schema. Every value is now a sequence (a single atomic value or node is regarded as a sequence of length one). XPath 1.0 node-sets are replaced by node sequences, which may be in any order.

To support richer type sets, XPath 2.0 offers a greatly expanded set of functions and operators.

XPath 2.0 is in fact a subset of XQuery 1.0. It offers a for expression which is cut-down version of the "FLWOR" expressions in XQuery. It is possible to describe the language by listing the parts of XQuery that it leaves out: the main examples are the query prolog, element and attribute constructors, the remainder of the "FLWOR" syntax, and the typeswitch expression.

ee also

*XPath 1.0
*XPath 2.0

External links

* [http://www.w3.org/TR/xpath XPath 1.0 specification]
* [http://www.w3.org/TR/xpath20/ XPath 2.0 specification]
* [http://www.xml.com/pub/a/2002/03/20/xpath2.html What's New in XPath 2.0]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • XPath 1.0 — XPath (XML Path Language) is a language for selecting nodes from an XML document. In addition, XPath may be used to compute values (strings, numbers, or boolean values) from the content of an XML document. The current version of the language is… …   Wikipedia

  • XPath — est un langage (non XML) pour localiser une portion d un document XML. Initialement créé pour fournir une syntaxe et une sémantique aux fonctions communes à XPointer et XSL, XPath a rapidement été adopté par les développeurs comme langage d… …   Wikipédia en Français

  • XPath 2.0 — is the current version of the XPath language defined by the World Wide Web Consortium, W3C. It became a recommendation on 23 January 2007.XPath is used primarily for selecting parts of an XML document. For this purpose the XML document is… …   Wikipedia

  • XPath — (XML Path Language) es un lenguaje que permite construir expresiones que recorren y procesan un documento XML. La idea es parecida a las expresiones regulares para seleccionar partes de un texto sin atributos (plain text). XPath permite buscar y… …   Wikipedia Español

  • Xpath — (XML Path Language) язык запросов к элементам XSLT, и является стандартом консорциума W3C. В XPath используется компактный синтаксис, отличный от принятого в XML. В 2007 году завершилась разработка версии 2.0, которая теперь является составной… …   Википедия

  • XPath — es un lenguaje (basado en XML) que permite seleccionar subconjuntos de un documento XML. La idea es parecida a las expresiones regulares para seleccionar partes de un texto sin atributos (plain text). XPath permite buscar y seleccionar teniendo… …   Enciclopedia Universal

  • XPath — Die XML Path Language (XPath) ist eine vom W3 Konsortium entwickelte Abfragesprache, um Teile eines XML Dokumentes zu adressieren. XPath dient als Grundlage einer Reihe weiterer Standards wie XSLT, XPointer und XQuery. Seit ihrer Verabschiedung… …   Deutsch Wikipedia

  • XPATH — Die XML Path Language (XPath) ist eine vom W3 Konsortium entwickelte Abfragesprache, um Teile eines XML Dokumentes zu adressieren. XPath dient als Grundlage einer Reihe weiterer Standards wie XSLT, XPointer und XQuery. Seit ihrer Verabschiedung… …   Deutsch Wikipedia

  • XPath — Эта статья или раздел нуждается в переработке. Пожалуйста, улучшите статью в соответствии с правилами написания статей. XPath (XML Path Language)  я …   Википедия

  • Xpath data model — XPath is a language for selecting portions of an XML Document (sequences of nodes of an XML tree). XPath uses a specific conceptual interpretation XML documents, referred to as the XPath Data Model. Technical documents on XML often uses the same… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”