xmlem
XML DOM manipulation for Rust.
Quickstart
let mut doc = from_str.unwrap;
let root = doc.root;
let potato = root.query_selector.unwrap;
potato.append_new_element;
let decl = v1_1;
doc.set_declaration;
doc.set_doctype;
println!;
/*
Prints:
<?xml version="1.1" encoding="utf-8" ?>
<!DOCTYPE not-html>
<root>
<potato>
<wow easy="true" x="200" a-null="�" />
</potato>
</root>
*/
You can run this example with cargo run --example readme
, and see the examples/readme.rs
file.
Projects using xmlem
- kbdgen: a keyboard layout generation tool used by minority and indigenous language communities
- xml-pretty: a command line XML prettifier
License
This project is 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.