xmlite 0.2.0

a light-weight, read-write XML parser.
Documentation
  • Coverage
  • 100%
    21 out of 21 items documented7 out of 16 items with examples
  • Size
  • Source code size: 204.87 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.05 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 13s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • vodofrede/xmlite-rs
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • vodofrede

xml-rs

An XML 1.0 document parser implementation for Rust.

Usage

let text = r#"<?xml?><can><beans kind="fava">Cool Beans</beans><sauce></sauce></can>"#;
let xml = xmlite::parse(text).expect("failed to parse as xml");
assert_eq!(xml.name(), Some("can"));
assert_eq!(xml.children().next().unwrap().name(), Some("beans"));
assert_eq!(xml.children().next().unwrap().attr("kind"), Some("fava"));

See the documentation for more usage instructions.

Limitations

This library is not 1.0 yet, and might be missing some features (I don't know which ones). Needs a once-over with the specification in hand.

Specifically missing (for now) is support for:

  • Spans for errors
  • CDATA sections
  • Namespaces
  • Numeric character references
  • '&amp;', '&lt;' and '&gt'
  • Reading PIs (currently ignored)
  • Reading comments (currently ignored)
  • XML version & encoding

License

This project is licensed under the AGPL. See license.txt for more information.