Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. XML
  3. XPath

XPath

XPath stands for XML Path Language. It uses a non-XML syntax to provide a flexible way of addressing (pointing to) different parts of anXML document. 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 inXSLT, but can also be used as a much more powerful way of navigating through theDOM of any XML-like language document usingXPathExpression, such asHTML andSVG, instead of relying on theDocument.getElementById() orDocument.querySelectorAll() methods, theNode.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.

Guides

TheXPath guides cover practical snippets and describe how to use XPath in JavaScript.

Introduction to using XPath in JavaScript

Describes a non-XSLT use of XPath.

XPath snippets

These are JavaScript utility functions, that can be used in your own code, based on XPath APIs.

Reference

TheXPath reference covers all XPath axes and functions documented on MDN.

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.

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp