XmlWriter

a no fluff, minimalistic, zero-copy xml writer for Rust.

Usage

```rust extern crate xmlwriter; use xmlwriter::::XmlWriter;

let mut xml = XmlWriter::new(Vec::new()); // supply any Writer, preferrably BufferedWriter xml.beginelem("root"); xml.comment("nice to see you"); xml.beginelem("node"); xml.attresc("name", "\"123\""); xml.attr("id", "abc"); xml.attr("'unescaped'", "\"123\""); // this WILL intentionally generate invalid xml xml.text("'text'"); xml.endelem(); xml.beginelem("stuff"); xml.cdata("blablab"); // xml.endelem(); // the latter close() will close all open nodes // xml.end_elem(); xml.close(); xml.flush();

let actual = xml.into_inner(); ```

License

Licensed under either of * Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) * MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.