Namespace-aware
Full namespace resolution with a prefix → URI stack and correct QName parsing.
Rust · XML DOM parser & serializer
xml_rs parses documents into an ID-based DOM tree, lets you
navigate and edit them, and serializes back to XML while preserving
namespace prefixes and attribute order. It powers XML processing in
openxml-office.
Full namespace resolution with a prefix → URI stack and correct QName parsing.
Serialization preserves original namespace prefixes and attribute order, so parse → serialize stays faithful.
An ID-based tree model (arena-like) keeps allocations flat for large
documents — with no unsafe code.
Attributes keep their source order via an index map, important for deterministic output.
Elements, text, mixed content and comments are all preserved in the DOM.
Reads the XML declaration (version, encoding, standalone) and normalizes line breaks.