draviavemal-xml_rs

Crates.iodraviavemal-xml_rs
lib.rsdraviavemal-xml_rs
version1.0.2
created_at2025-08-16 11:19:03.671548+00
updated_at2025-08-19 11:29:26.300477+00
descriptionA high-performance, low-memory XML DOM parser for Rust — with namespace-aware parsing, order-preserving attributes, and round-trip safe serialization.
homepagehttps://github.com/DraviaVemal/xml_rs
repositoryhttps://github.com/DraviaVemal/xml_rs
max_upload_size
id1798322
size89,023
Dravia Vemal (DraviaVemal)

documentation

https://github.com/DraviaVemal/xml_rs

README

draviavemal-xml_rs (AGPL-3.0)

A high-performance, low-memory XML DOM parser for Rust — with namespace-aware parsing, order-preserving attributes, and round-trip safe serialization.

Latest Version License

📜 License

  • Open Source: AGPL-3.0 (see LICENSE)
  • Commercial: Available via sponsorship (see LICENSE)

✨ Features

  • UTF-8 focused XML parsing
  • Reads XML declaration (version, encoding, standalone)
  • Line break normalization (\r\n / \r\n)
  • Full namespace resolution with prefix → URI stack
  • Correct QName parsing ({namespace_uri, local_name})
  • Order-preserving attributes (using IndexMap)
  • Support for:
    • Elements (<tag> / <tag/>)
    • Attributes (namespaced & unnamespaced)
    • Mixed content (text + elements)
    • Comments (<!-- -->)
  • Round-trip safe serialization:
    • Preserves original namespace prefixes
    • namespace alias rename
    • Preserves attribute order
  • Low memory ID-based tree model (similar to arena allocation)
  • No unsafe code

📖 Documentation

  • Working on setting up a central system for all my OSS contribution will update link in description once ready. Please refer to tests crate present in this repository to understand the methods

📦 Installation

cargo add draviavemal-xml_rs

Commit count: 21

cargo fmt