xmlwriter

Build Status Crates.io Documentation

A simple, streaming, partially-validating XML writer that writes XML data into an internal buffer.

Features

Example

```rust use xmlwriter::*;

let opt = Options { usesinglequote: true, ..Options::default() };

let mut w = XmlWriter::new(opt); w.startelement("svg"); w.writeattribute("xmlns", "http://www.w3.org/2000/svg"); w.writeattributefmt("viewBox", formatargs!("{} {} {} {}", 0, 0, 128, 128)); w.startelement("text"); // We can write any object that implements fmt::Display. w.writeattribute("x", &10); w.writeattribute("y", &20); w.writetextfmt(format_args!("length is {}", 5));

asserteq!(w.enddocument(), " length is 5 "); ```

License

MIT