Crates.io | szl-simple-xml |
lib.rs | szl-simple-xml |
version | 0.1.3 |
source | src |
created_at | 2024-04-04 13:54:52.123973 |
updated_at | 2024-04-04 14:21:36.187734 |
description | A dead simple xml parser - editor: Sazhelle Gutierrez-Moulton |
homepage | |
repository | https://github.com/ChromeSkullex/simple-xml |
max_upload_size | |
id | 1196219 |
size | 35,814 |
Hello! This was a project made by Freja Roberts and want to first give credit for them. I'm still slowly updating this project because it's super intuitive but just needs updating.
Szl Simple xml is a small crate for reading, parsing and storing xml as an extension from simple-xml. This extension adds getting mutable nodes
Example parsing:
let note =
szl_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");
For additional examples, please see: Docs