simple-xml-builder
A Rust library for building and outputing xml documents. The constructed model is write-only, and allows for writing the represented XML document.
Usage
Add this to your Cargo.toml
:
[]
= "1.0.0"
and this to your crate root:
extern crate simple_xml_builder;
Example
use File;
use XMLElement;
let mut file = create?;
let mut person = new;
person.add_attribute;
let mut name = new;
name.add_text;
person.add_child;
let mut age = new;
age.add_text;
person.add_child;
let hobbies = new;
person.add_child;
person.write?;
sample.xml
will contain:
Joe Schmoe
24