Skip to main content

parse_xpath20

Function parse_xpath20 

Source
pub fn parse_xpath20(input: &str) -> Result<ParsedXPath, XPathError>
Expand description

Parse an XPath expression in XPath 2.0 mode, returning XPathError on failure.

Convenience wrapper around parse_with_options with XPathMode::XPath20.

ยงExample

use xsd_schema::xpath::parser::parse_xpath20;

let result = parse_xpath20("for $x in 1 to 10 return $x").unwrap();
println!("Parsed {} nodes", result.node_count());