XPathExpression.parse

XPathExpression parse(string expression) static @safe

Parses an XPath expression.

Supported subset:

  • child steps: a/b
  • descendant-or-self: //b
  • descendant: descendant::b
  • self: `.`
  • parent: `..`
  • wildcard: ``
  • node tests: node(), text(), comment(), processing-instruction()
  • attribute axis selection: @id, `@`, attribute::*
  • all XPath 1.0 axes except namespace
  • predicates: [n], [@attr], [@attr='value']

    Parameters

    expressionXPath expression.

    Returns

    Parsed XPathExpression.

    Throws

    XmlException on syntax errors.