embedded-xml 1.0.0

A no_std XML reader using embedded-io for memory constrainted environment.
Documentation
  • Coverage
  • 10.34%
    3 out of 29 items documented1 out of 2 items with examples
  • Size
  • Source code size: 87.11 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.9 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • HookedBehemoth

embedded-xml

A no_std XML reader using embedded-io for memory constrainted environment.

Features

  • no_std
  • alloc optional
  • streaming

Usage

// allocates 1024 bytes internally
let mut reader = xml::Reader::new(&mut reader, xml.len(), 1024)?;
loop {
    match reader.next_event()? {
        xml::Event::StartElement { name, attrs } => {
            println!("Start element: {name} with attributes: {attrs:?}");
        }
        xml::Event::EndElement { name } => {
            println!("End element: {name}");
        }
        xml::Event::EndOfFile => break,
        _ => {}
    }
}

Limitations & non-goals

  • no rewinding
  • no DTD support
  • no XPath
  • no decoding
  • individual "Events" have to fit inside the internal buffer