Skip to main content

Module parser

Module parser 

Source
Expand description

XPath 2.0 Parser module.

This module provides the public API for parsing XPath 2.0 expressions. It uses the LALRPOP-generated parser with a custom stateful lexer.

Modules§

xpath_grammar

Structs§

ParsedXPath
Result of parsing an XPath expression.

Enums§

ParseError
Error type for XPath parsing.

Functions§

parse
Parse an XPath 2.0 expression string.
parse_expr
Parse an XPath expression and return just the root node ID.
parse_expr_with_mode
Parse an XPath expression with a specific mode and return just the root node ID.
parse_with_mode
Parse an XPath expression with a specific mode (XPath 1.0 or 2.0).
parse_with_options
Parse an XPath expression with structured options, returning XPathError on failure.
parse_xpath10
Parse an XPath expression in XPath 1.0 mode, returning XPathError on failure.
parse_xpath20
Parse an XPath expression in XPath 2.0 mode, returning XPathError on failure.