Skip to main content

Crate xmloxide

Crate xmloxide 

Source
Expand description

§xmloxide

A pure Rust reimplementation of libxml2 — the de facto standard XML/HTML parsing library. Memory-safe, high-performance, and conformant with the W3C XML 1.0 (Fifth Edition) specification.

§Modules

  • tree — DOM tree representation with arena-allocated nodes (Document, NodeId)
  • parser — XML 1.0 parser with error recovery and push/incremental parsing
  • html — Error-tolerant HTML 4.01 parser
  • sax — SAX2 event-driven streaming parser
  • readerXmlReader pull-based parsing API
  • xpathXPath 1.0 expression evaluation
  • validation — DTD, RelaxNG, and XML Schema (XSD) validation
  • serial — XML/HTML serialization and Canonical XML (C14N)
  • encoding — Character encoding detection and conversion
  • xincludeXInclude 1.0 document inclusion
  • catalog — OASIS XML Catalogs for URI resolution
  • error — Error types and diagnostics

§Quick Start

use xmloxide::Document;

let doc = Document::parse_str("<root><child>Hello</child></root>").unwrap();
let root = doc.root_element().unwrap();
assert_eq!(doc.node_name(root), Some("root"));

Re-exports§

pub use tree::Attribute;
pub use tree::Document;
pub use tree::NodeId;

Modules§

catalog
XML Catalogs for URI resolution (OASIS XML Catalogs 1.1).
encoding
Encoding detection and transcoding.
error
Error types and diagnostics for XML parsing.
ffi
C FFI layer for xmloxide.
html
Error-tolerant HTML parser.
parser
XML 1.0 parser.
reader
Pull-based streaming XML reader API.
sax
SAX2 streaming event handler API.
serial
XML and HTML serialization.
tree
Arena-based XML document tree.
validation
Document validation framework.
xinclude
XInclude 1.0 processing.
xpath
XPath 1.0 query language implementation.