Expand description
XPath2 evaluation engine
This module provides the full XPath 2.0 parser, binder, and evaluator.
§Core Types (re-exported from navigator)
DomNavigator- Trait for cursor-based XML navigationDomNodeType- Node type enumeration (Element, Text, Attribute, etc.)XmlNodeOrder- Document order comparison resultNamespaceAxisScope- Scope filter for namespace axis traversal
§Parser
Re-exports§
pub use crate::navigator::DomNodeType;pub use crate::navigator::NamespaceAxisScope;pub use crate::navigator::TypedValue;pub use crate::navigator::XmlNodeOrder;pub use self::api::EvalValue;pub use self::api::ExternalVar;pub use self::api::TypedEvaluator;pub use self::api::XPathEvaluator;pub use self::api::XPathExpr;pub use self::arena::AstArena;pub use self::arena::AstNodeId;pub use self::arena::SourceSpan;pub use self::ast::AstNode;pub use self::axis_iterators::AncestorAxis;pub use self::axis_iterators::AttributeAxis;pub use self::axis_iterators::AxisTraversal;pub use self::axis_iterators::ChildAxis;pub use self::axis_iterators::ChildOverDescendantsNodeIterator;pub use self::axis_iterators::DescendantNodeIterator;pub use self::axis_iterators::FollowingNodeIterator;pub use self::axis_iterators::FollowingSiblingAxis;pub use self::axis_iterators::NamespaceAxis;pub use self::axis_iterators::ParentAxis;pub use self::axis_iterators::PrecedingNodeIterator;pub use self::axis_iterators::PrecedingSiblingAxis;pub use self::axis_iterators::SelfAxis;pub use self::axis_iterators::SequentialAxisNodeIterator;pub use self::axis_iterators::SpecialChildNodeIterator;pub use self::axis_iterators::SpecialDescendantNodeIterator;pub use self::bind::bind_node;pub use self::context::DynamicContext;pub use self::context::NameBinder;pub use self::context::VarRef;pub use self::context::VarSlotId;pub use self::context::VarStore;pub use self::context::XPathContext;pub use self::error::XPathError;pub use self::eval::eval_node;pub use self::functions::FunctionArity;pub use self::functions::FunctionId;pub use self::functions::FunctionSignature;pub use self::functions::XPathValue;pub use self::functions::FUNCTION_REGISTRY;pub use self::item_set::ItemSet;pub use self::item_set::ItemSetIter;pub use self::item_set::ItemSetIterMut;pub use self::item_set::XPathComparer;pub use self::item_set::XPathEqualityComparer;pub use self::iterator::BufferedNodeIterator;pub use self::iterator::DocumentOrderNodeIterator;pub use self::iterator::EmptyIterator;pub use self::iterator::ItemIterator;pub use self::iterator::PositionFilterNodeIterator;pub use self::iterator::RangeIterator;pub use self::iterator::VecNodeIterator;pub use self::iterator::XmlItem;pub use self::iterator::XmlItemRef;pub use self::iterator::XmlNodeIterator;pub use self::lexer::Lexer;pub use self::lexer::Token;pub use self::node_test::matches_name_test;pub use self::node_test::matches_sequence_type;pub use self::node_test::NodeTest;pub use self::parser::parse;pub use self::parser::parse_with_options;pub use self::parser::parse_xpath10;pub use self::parser::parse_xpath20;pub use self::parser::ParseError;pub use self::parser::ParsedXPath;pub use self::timsort::timsort;pub use self::timsort::timsort_by;pub use self::timsort::timsort_slice;pub use self::timsort::timsort_slice_by;pub use self::timsort::timsort_slice_with_comparer;pub use self::timsort::timsort_with_comparer;pub use self::timsort::FnComparer;pub use self::timsort::IComparer;pub use self::timsort::OrdComparer;pub use self::timsort::ReverseComparer;pub use self::tree_comparer::TreeComparer;
Modules§
- api
- High-level, ergonomic XPath evaluation API.
- arena
- Arena-based storage for XPath AST nodes.
- ast
- XPath 2.0 Abstract Syntax Tree (AST) definitions. This module defines the AST node types for the XPath 2.0 parser. All types are stubbed (fields defined but minimal behavior) to enable parser development. Full evaluation semantics will be added later.
- atomize
- Atomization operations for XPath evaluation.
- axis_
iterators - XPath axis iterators aligned with the C# XPath20Api implementation.
- bind
- XPath AST binding phase.
- boolean
- Boolean operations for XPath evaluation.
- cast
- Type casting operations for XPath evaluation.
- context
- XPath static and dynamic context definitions.
- error
- XPath error types.
- eval
- XPath AST evaluation phase.
- functions
- XPath 2.0 function registry and dispatch.
- item_
set - ItemSet - A dynamic collection for XPath items with sorting support.
- iter_
adapters - Iterator adapters for XPath evaluation.
- iterator
- XPath2 item and node iterator abstractions.
- lexer
- XPath 2.0 Lexer with stateful lookahead.
- node_
ops - Node operations for XPath evaluation.
- node_
test - XPath node test matching helpers.
- operators
- XPath operator evaluation helpers.
- parser
- XPath 2.0 Parser module.
- quantified
- Quantified expression support for XPath evaluation.
- sequence_
ops - Sequence operations for XPath evaluation.
- string_
ops - String operations for XPath evaluation.
- timsort
- A stable, adaptive, iterative mergesort that requires far fewer than n lg(n) comparisons when running on partially sorted arrays, while offering performance comparable to a traditional mergesort when run on random arrays. Like all proper mergesorts, this sort is stable and runs O(n log n) time (worst case). In the worst case, this sort requires temporary storage space for n/2 object references; in the best case, it requires only a small constant amount of space.
- tree_
comparer - XPath tree comparison helpers.
- type_
info - Type information utilities for XPath evaluation.
Structs§
- XPath
Parse Options - Options for XPath parsing.
Enums§
- XPath
Mode - Selects XPath language version for parsing and evaluation.