exile
Current version: 0.0.1
exile
is a Rust library for reading and writing XML.
The goal is to provide a useful abstraction over XML with DOM-like structs. The state of the library is 'pre-alpha' See the GitHub issues and milestones for work planned.
Example
Parsing XML looks like this.
let xml = r#"
<root>
<thing name="foo"/>
<thing>bar</thing>
</root>
"#;
let doc = parse.unwrap;
for child in doc.root.children
Authoring XML looks like this.
use ;
let mut root = from_name;
// TODO - improve the interface
root.attributes.mut_map.insert;
let mut child = from_name;
child.nodes.push;
root.nodes.push;
let doc = from_root;
println!;
The program above prints:
Hello World!
Crates
Development is setup as a cargo workspace with three crates.
xdoc
is the root dependency and contains structs that represent an XML documentxtest
contains test files and helper functions for loading them.exile
is the public-facing crate and includes the parser.
Work to Do
Current status is 'pre-mvp'. v0.0.0 will be able to parse basic XML documents into DOM-like structures and serialize them back.