XPath significa XML Path Language. Este utiliza uma sintaxe não XML para fornecer uma maneira flexível de endereçamento (apontando para) partes diferentes de um documento XML. Este também pode ser utilizado para testar, endereçar nodos dentro de um documento para determinar se eles correspondem a um padrão ou não.
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-like language document, such as HTML and XUL, instead of relying on the
document.getElementById method, the
Node.childNodes properties, and other DOM Core features.
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.
Nota: Support for XPath varies widely; it's supported reasonably well in Firefox (although there are no plans to improve support further), while other browsers implement it to a lesser extent, if at all. If you need a polyfill, you may consider js-xpath or wicked-good-xpath.
- Describes a non-XSLT use of XPath.
- List and definition of the axes defined in the XPath specification. Axes are used to describe the relationships between nodes.
- 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 an XML document that it wishes to transform.
- XPath snippets
- 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.
- Feature rich XPath generator, editor, inspector, and simple extraction tool (FireFox Add-On).
- 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).
- XMLQuire (formerly known as SketchPath)
- A Graphical XPath Builder/Debugger(.NET).
Etiquetas do documento e contribuidores