Skip to main content

Crate babbel_xml

Crate babbel_xml 

Source
Expand description

§XML Lib (Rust Port)

A full-featured, high-performance, pure Rust XML library offering:

  • XML Parsing & DOM Construction (Arena-based Document model)
  • 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§

IByteStream
Composite interface for raw byte reading (essential for Bencode and binary protocol parsing). Automatically implemented for any type that satisfies IByteReader and IPeekable.
ICharStream
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.
IPositionAware
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 for parse_bytes.
from_source
Parse an XML stream from ISource into a DOM Document. Canonical alias for parse_source.
from_str
Parse an XML string slice into a DOM Document. Canonical alias for parse.
parse
Parse an XML string slice into a DOM Document using default parsing options.
parse_bytes
Parse raw byte slice into a DOM Document with automatic UTF-8 / UTF-16 BOM detection.
parse_bytes_with_encoding
Parse raw byte slice into a DOM Document with an explicitly specified character encoding.
parse_file
Parse an XML file from disk into a DOM Document with automatic UTF-8 / UTF-16 BOM detection.
parse_file_with_options
Parse an XML file from disk into a DOM Document with custom security options.
parse_reader
Parse an XML stream from an arbitrary std::io::Read into a DOM Document.
parse_source
Parse an XML input stream implementing ISource into a DOM Document using default parsing options.
parse_source_with_options
Parse an XML input stream implementing ISource into a DOM Document with custom options.
parse_with_options
Parse an XML string slice into a DOM Document with custom security limits and parse options.
stringify
Serialize a DOM Document into a formatted UTF-8 XML string representation.
to_string
Serialize a DOM Document into an owned XML String. Canonical alias for [stringify].
to_vec
Serialize a DOM Document into a byte vector (Vec<u8>).