mozilla

Revision 62394 of XPath

  • Slug della versione: XPath
  • Titolo della versione: XPath
  • ID versione: 62394
  • Data di creazione
  • Autore: fusionchess
  • Versione corrente? No
  • Commento page created, 351 words added

Contenuto della versione

{{ T() }}

XPath stands for XML Path Language, it uses a non-XML syntax that provides a flexible way of addressing (pointing to) different parts of an XML document. As well as this, it can also be used to test addressed nodes within a document to determine whether they match a pattern or not.

XPath is mainly used in XSLT, but can also be used as a much more powerful way of navigating through the DOM of any XML based language documents, such as HTML and XUL, instead of relying on the {{ Domxref("document.getElementById") }} method, the {{ Domxref("element.childNodes") }} properties, and other DOM Core features. The following is vague: This is especially useful within extensions, particularly regarding to overlays.

XPath uses a path notation (as in URLs) for navigating through the hierarchical structure of an XML document. It uses a non-XML syntax so that it can be used in URIs and XML attribute values.

Documentation

Introduction to using XPath in JavaScript
Describes a non-XSLT use of XPath.
XPath:Axes
List and definition of the axes defined in the XPath specification. Axes are used to describe the relationships between nodes.
XPath:Functions
List and description of the core XPath functions and XSLT-specific additions to XPath.
Transforming XML with XSLT
XSLT uses XPath to address code segments in a XML document that it wishes to transform.
Using XPath
Code snippets and examples of using DOM bindings for XPath.
What is XSLT?
This extensive introduction to XSLT and XPath assumes no prior knowledge of the technologies, and guides the reader through background, context, structure, concepts and introductory terminology.

View All...

Tools

XPather
Feature rich XPath generator, editor, inspector and simple extraction tool (FireFox Add-On).
FireXPath
XPath panel that integrates tightly into FireBug, providing an editor and inspector (FireFox Add-On).
XPath Checker
An interactive editor for XPath expressions (FireFox Add-On).
SketchPath
A Graphical XPath Builder/Debugger(.NET).
XSLT, XQuery, XML, DOM, JSONPath

 

{{ languages( { "cs": "cs/XPath", "es": "es/XPath", "fr": "fr/XPath", "ja": "ja/XPath", "ko": "ko/XPath", "pl": "pl/XPath", "zh-cn": "cn/XPath" } ) }}

Sorgente della versione

<p>{{ T() }}</p>
<p>XPath stands for XML Path Language, it uses a non-XML syntax that provides a flexible way of addressing (pointing to) different parts of an <a href="/en/XML" title="en/XML">XML</a> document. As well as this, it can also be used to test addressed nodes within a document to determine whether they match a pattern or not.</p>
<p>XPath is mainly used in <a href="/en/XSLT" title="en/XSLT">XSLT</a>, but can also be used as a much more powerful way of navigating through the <a href="/en/DOM" title="en/DOM">DOM</a> of any XML based language documents, such as HTML and <a href="/en/XUL" title="en/XUL">XUL</a>, instead of relying on the {{ Domxref("document.getElementById") }} method, the {{ Domxref("element.childNodes") }} properties, and other DOM Core features. <span class="comment">The following is vague: This is especially useful within extensions, particularly regarding to <a href="/en/XUL_Overlays" title="en/XUL_Overlays">overlays</a>.</span></p>
<p>XPath uses a path notation (as in URLs) for navigating through the hierarchical structure of an XML document. It uses a non-XML syntax so that it can be used in URIs and XML attribute values.</p>
<table class="topicpage-table"> <tbody> <tr> <td> <h4 id="Documentation" name="Documentation"><a href="/Special:Tags?tag=XPath&amp;language=en" title="Special:Tags?tag=XPath&amp;language=en">Documentation</a></h4> <dl> <dt><a href="/en/Introduction_to_using_XPath_in_JavaScript" title="en/Introduction_to_using_XPath_in_JavaScript">Introduction to using XPath in JavaScript</a></dt> <dd><small>Describes a non-XSLT use of XPath.</small></dd> </dl> <dl> <dt><a href="/en/XPath/Axes" title="en/XPath/Axes">XPath:Axes</a></dt> <dd><small>List and definition of the axes defined in the XPath specification. Axes are used to describe the relationships between nodes.</small></dd> </dl> <dl> <dt><a href="/en/XPath/Functions" title="en/XPath/Functions">XPath:Functions</a></dt> <dd><small>List and description of the core XPath functions and XSLT-specific additions to XPath.</small></dd> </dl> <dl> <dt><a href="/en/Transforming_XML_with_XSLT" title="en/Transforming_XML_with_XSLT">Transforming XML with XSLT</a></dt> <dd><small>XSLT uses XPath to address code segments in a XML document that it wishes to transform.</small></dd> </dl> <dl> <dt><a href="/en/Using_XPath" title="en/Using_XPath">Using XPath</a></dt> <dd><small>Code snippets and examples of using DOM bindings for XPath.</small></dd> </dl> <dl> <dt><a class="external" href="http://www.xml.com/pub/a/2000/08/holman/">What is XSLT?</a></dt> <dd><small>This extensive introduction to XSLT and XPath assumes no prior knowledge of the technologies, and guides the reader through background, context, structure, concepts and introductory terminology.</small></dd> </dl> <p><span class="alllinks"><a href="/Special:Tags?tag=XPath&amp;language=en" title="Special:Tags?tag=XPath&amp;language=en">View All...</a></span></p> </td> <td> <h4 id="Tools" name="Tools">Tools</h4> <dl> <dd><a class="link-https" href="https://addons.mozilla.org/en-US/firefox/addon/1192">XPather</a></dd> <dd><small>Feature rich XPath generator, editor, inspector and simple extraction tool (FireFox Add-On).</small></dd> </dl> <dl> <dd><a class="link-https" href="https://addons.mozilla.org/en-US/firefox/addon/11900" title="https://addons.mozilla.org/en-US/firefox/addon/11900">FireXPath</a></dd> <dd><small>XPath panel that integrates tightly into FireBug, providing an editor and inspector (FireFox Add-On).</small></dd> </dl> <dl> <dd><a class="link-https" href="https://addons.mozilla.org/en-US/firefox/addon/1095">XPath Checker</a></dd> <dd><small>An interactive editor for XPath expressions (FireFox Add-On).</small></dd> </dl> <dl> <dd><a class="external" href="http://www.sketchpath.com/">SketchPath</a></dd> <dd><small>A Graphical XPath Builder/Debugger(.NET).</small></dd> </dl> <h4 id="Related_Topics" name="Related_Topics">Related Topics</h4> <dl> <dd><a href="/en/XSLT" title="en/XSLT">XSLT</a>, <a href="/en/XQuery" title="en/XQuery">XQuery</a>, <a href="/en/XML" title="en/XML">XML</a>, <a href="/en/DOM" title="en/DOM">DOM</a>, <a href="/en/JSON/JSONPath" title="en/JSON/JSONPath">JSONPath</a></dd> </dl> <p> </p> </td> </tr> </tbody>
</table>
<p>{{ languages( { "cs": "cs/XPath", "es": "es/XPath", "fr": "fr/XPath", "ja": "ja/XPath", "ko": "ko/XPath", "pl": "pl/XPath", "zh-cn": "cn/XPath" } ) }}</p>
Ripristina questa versione