Skip to main content

Crate sup_xml_core

Crate sup_xml_core 

Source
Expand description

Core parsing, serialization, namespace resolution, and XPath evaluation for SupXML.

This crate is the implementation heart of SupXML. Most users should depend on the sup-xml crate instead, which re-exports everything here through a stable public surface.

Re-exports§

pub use canonical::C14nMode;
pub use canonical::CanonicalizeOptions;
pub use catalog::Catalog;
pub use catalog::discover_catalog_paths;
pub use catalog::load_default as load_default_catalog;
pub use xinclude::XIncludeOptions;
pub use xinclude::XINCLUDE_NS;
pub use entity_resolver::ChainedResolver;
pub use entity_resolver::EntityResolver;
pub use entity_resolver::FilesystemResolver;
pub use entity_resolver::InMemoryResolver;
pub use entity_resolver::ResolveError;
pub use error::ErrorDomain;
pub use error::ErrorLevel;
pub use error::XmlError;
pub use license_gate::verify_license;
pub use options::ParseOptions;
pub use parser::parse_bytes;
pub use parser::parse_bytes_unchecked;
pub use parser::parse_str;
pub use parser::parse_bytes_in_place;
pub use parser::parse_ns_str;
pub use parser::parse_ns_bytes;
pub use parser::parse_str_with_recovered;
pub use parser::parse_bytes_with_recovered;
pub use serializer::serialize_html_to_string;
pub use serializer::serialize_formatted;
pub use serializer::serialize_to_bytes;
pub use serializer::serialize_to_string;
pub use serializer::serialize_with;
pub use serializer::SerializeOptions;
pub use output::OutputCharset;
pub use stream_parser::StreamParser;
pub use streaming_reader::XmlByteStreamReader;
pub use streaming_reader::DEFAULT_BUFFER_SIZE;
pub use streaming_reader::HUGE_BUFFER_SIZE;
pub use reader::Attr;
pub use reader::Attrs;
pub use reader::Event;
pub use reader::EventInto;
pub use reader::XmlReader;
pub use reader::unescape;
pub use selector::ParseSelectorError;
pub use selector::Selector;
pub use xml_bytes_reader::BytesAttr;
pub use xml_bytes_reader::BytesAttrs;
pub use xml_bytes_reader::BytesEvent;
pub use xml_bytes_reader::BytesEventInto;
pub use xml_bytes_reader::XmlBytesReader;
pub use xml_bytes_reader::XmlDeclInfo;
pub use xml_bytes_reader::resolve_uri;
pub use xml_bytes_reader::unescape_bytes;
pub use types::XmlChar;
pub use xpath::parse_xpath;
pub use xpath::parse_xpath_with;
pub use xpath::XPathOptions;
pub use xpath::XPathValue;
pub use xpath::XPathBindingsBuilder;
pub use xpath::xpath_bool;
pub use xpath::xpath_count;
pub use xpath::xpath_eval;
pub use xpath::xpath_num;
pub use xpath::xpath_str;
pub use xpath::xpath_strings;
pub use xpath::XPathContext;
pub use rust_decimal;

Modules§

canonical
Canonical XML serialization (W3C C14N) for the arena DOM.
catalog
OASIS XML Catalogs — local mappings from public/system identifiers to filesystem paths. See § “XML Catalogs” in COMPARISON.md for the rationale.
charsets
Character classification for XML 1.0 names.
dtd
DTD validation engine.
encoding
Encoding detection and transcoding to UTF-8.
entity_resolver
Pluggable resolver for external XML resources (DTDs, parsed entities) referenced by SYSTEM / PUBLIC identifier.
error
html
Lenient HTML5 parser.
iterparse
Streaming-iterator wrapper for the SAX reader.
license_gate
Process-wide license gate.
ns_helpers
Shared XML Namespaces 1.0 utilities used by crate::parser and crate::stream_parser.
options
output
parser
SAX-driven arena DOM parser.
reader
XmlReader — string-typed streaming SAX-style API.
regex
XSD §F regex engine — native parser, NFA, Pike VM.
relaxng
RelaxNG validation against the arena DOM.
selector
Minimal CSS-subset selector for streaming-parser emit modes.
serializer
Serialize a sup_xml_tree::dom::Document back to XML text.
stream_parser
Streaming pull parser that yields arena-allocated subtrees.
streaming_reader
Streaming XML reader over io::Read.
types
xinclude
W3C XInclude 1.0 — arena-DOM port of crate::xinclude.
xml_bytes_reader
XmlBytesReader — bytes-typed streaming SAX-style API.
xpath
XPath 1.0 expression parsing and evaluation.
xsd
XML Schema 1.0 — schema compiler and instance validator.

Functions§

compute_line_col
Byte-offset → (line, column) translation over source bytes, for consumers that compute node.line / Element.sourceline outside the parser (e.g. the C-ABI incremental push parser). Compute 1-based (line, col) for the given byte offset in src.