xmlite
XML 1.0 parser library for Rust.
Usage
The two most relevant functions are xmlite::document and xmlite::tags for parsing a whole document or individual tags.
See the documentation for specific usage instructions.
Examples
Parse a document:
let text = r#"<?xml?><can><beans kind="fava">Cool Beans</beans><sauce></sauce></can>"#;
let xml = document.unwrap;
eprintln!;
assert_eq!;
assert_eq!;
assert_eq!;
Mutate the document afterwards:
let text = r#"<?xml?><bag><pastry kind="danish" /></bag>"#;
let mut xml = document.unwrap;
# assert_eq!;
let attr = xml.children_mut.find.unwrap.attr_mut;
*attr.unwrap = "berliner".to_owned;
License
This project is licensed under the AGPL. See the license text for more information.
References
https://www.w3.org/TR/REC-xml/
https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home