XPath

XPath

An XPath expression for querying an XML document

Constructor

new XPath(pattern)

Description:
  • Creates an instance of XPath.
Source:
Parameters:
Name Type Description
pattern string
Throws:
  • Not a string
    Type
    TypeError
  • Invalid syntax in the pattern
    Type
    XPathSyntaxError

Classes

XPath

Methods

execute(context) → {XPathResult}

Description:
  • Staring with the given context Node, execute the expression
Source:
Parameters:
Name Type Description
context dom.Node The DOM Node from which to base the expression's query
Returns:
resuts
Type
XPathResult