Crates.io | simple-xml |
lib.rs | simple-xml |
version | 0.1.10 |
source | src |
created_at | 2020-08-07 21:10:06.049371 |
updated_at | 2020-08-10 20:29:37.151606 |
description | A dead simple xml parser |
homepage | |
repository | https://github.com/ten3roberts/simple-xml |
max_upload_size | |
id | 274121 |
size | 29,922 |
Simple xml is a small crate for reading, parsing and storing xml data
Example parsing:
let note =
simple_xml::from_file("./examples/note.xml").expect("Failed to parse simple_xml");
let to = ¬e["to"][0];
let from = ¬e["from"][0];
let heading = ¬e.get_nodes("heading").expect("Missing heading")[0];
let body = ¬e["body"][0];
let lang = note
.get_attribute("lang")
.expect("Failed to get attribute lang");
More examples can be found in the docs and tests