Expand description
§XML Lib (Rust Port)
A full-featured, high-performance, pure Rust XML library offering:
- XML Parsing & DOM Construction (Arena-based
Documentmodel) - XML Serialization & Formatting (
XmlSerializer) - Entity Mapping & XXE Protection (
EntityMapper) - DTD Content Model & Constraint Validation (
DtdValidator) - XSD Schema & Restriction Facet Validation (
XsdValidator) - XPath 1.0 Lexing, Parsing, and Evaluation Engine (
XPathEngine)
Re-exports§
pub use document::Document;pub use dtd::DtdAttributeRule;pub use dtd::DtdElementRule;pub use dtd::DtdValidator;pub use dtd::ExternalSubsetResolver;pub use entity::EntityMapper;pub use entity::EntityResolver;pub use error::Result;pub use error::XmlError;pub use io::DestinationExt;pub use io::Format;pub use io::XmlDestination;pub use io::XmlSource;pub use namespace::Namespace;pub use namespace::NamespaceScope;pub use namespace::QName;pub use node::Attribute;pub use node::DeclarationData;pub use node::DocTypeData;pub use node::NodeData;pub use node::NodeId;pub use node::NodeKind;pub use options::ParseOptions;pub use parser::XmlParser;pub use parser::XmlPullAttribute;pub use parser::XmlPullEvent;pub use parser::XmlPullParser;pub use stringify::CanonicalOptions;pub use stringify::CanonicalSerializer;pub use stringify::SerializeOptions;pub use stringify::XmlSerializer;pub use stringify::canonicalize;pub use stringify::canonicalize_to;pub use stringify::canonicalize_to_with_options;pub use stringify::stringify_to;pub use stringify::stringify_to_with_options;pub use stringify::to_bencode;pub use stringify::to_bencode_bytes;pub use stringify::to_json;pub use stringify::to_json_string;pub use stringify::to_toml;pub use stringify::to_toml_string;pub use stringify::to_yaml;pub use stringify::to_yaml_string;pub use validator::XmlValidator;pub use xpath::XPathEngine;pub use xpath::XPathValue;pub use xsd::Compositor;pub use xsd::XsdAttributeRule;pub use xsd::XsdComplexType;pub use xsd::XsdElementRule;pub use xsd::XsdRestriction;pub use xsd::XsdValidator;pub use engine::XmlEngine;
Modules§
- alloc_
prelude - Alloc Prelude for
#![no_std]Compatibility - document
- Document (DOM Arena Model)
- dtd
- DTD Subsystem
- engine
- Format engine implementation adhering to OCP and DIP XML Format Engine adhering to OCP and DIP.
- entity
- Entity Subsystem
- error
- Error Types
- io
- Input / Output Module
- namespace
- XML Namespaces Subsystem
- node
- options
- Parse Options & Security Policy
- parser
- Parser Subsystem
- stringify
- Stringify Subsystem
- validator
- XML Validator Trait
- xpath
- XPath 1.0 Evaluation Subsystem
- xsd
- XSD Subsystem
Traits§
- IByte
Stream - Composite interface for raw byte reading (essential for Bencode and binary protocol parsing).
Automatically implemented for any type that satisfies
IByteReaderandIPeekable. - IChar
Stream - Minimal character reading interface adhering to ISP (Interface Segregation Principle).
- IClearable
- Interface for destinations that can be cleared or truncated.
- IDestination
- Interface for writing data to an output destination.
- IPosition
Aware - Interface for sources that report byte position.
- IRewindable
- Interface for streams that support rewinding to the beginning.
- ISource
- Standard sequential character reading source trait (LSP & backward compatibility).
Functions§
- from_
bytes - Parse raw byte slice into a DOM
Document. Canonical alias forparse_bytes. - from_
source - Parse an XML stream from
ISourceinto a DOMDocument. Canonical alias forparse_source. - from_
str - Parse an XML string slice into a DOM
Document. Canonical alias forparse. - parse
- Parse an XML string slice into a DOM
Documentusing default parsing options. - parse_
bytes - Parse raw byte slice into a DOM
Documentwith automatic UTF-8 / UTF-16 BOM detection. - parse_
bytes_ with_ encoding - Parse raw byte slice into a DOM
Documentwith an explicitly specified character encoding. - parse_
file - Parse an XML file from disk into a DOM
Documentwith automatic UTF-8 / UTF-16 BOM detection. - parse_
file_ with_ options - Parse an XML file from disk into a DOM
Documentwith custom security options. - parse_
reader - Parse an XML stream from an arbitrary
std::io::Readinto a DOMDocument. - parse_
source - Parse an XML input stream implementing
ISourceinto a DOMDocumentusing default parsing options. - parse_
source_ with_ options - Parse an XML input stream implementing
ISourceinto a DOMDocumentwith custom options. - parse_
with_ options - Parse an XML string slice into a DOM
Documentwith custom security limits and parse options. - stringify
- Serialize a DOM
Documentinto a formatted UTF-8 XML string representation. - to_
string - Serialize a DOM
Documentinto an owned XMLString. Canonical alias for [stringify]. - to_vec
- Serialize a DOM
Documentinto a byte vector (Vec<u8>).