szl-simple-xml

Crates.ioszl-simple-xml
lib.rsszl-simple-xml
version0.1.3
sourcesrc
created_at2024-04-04 13:54:52.123973
updated_at2024-04-04 14:21:36.187734
descriptionA dead simple xml parser - editor: Sazhelle Gutierrez-Moulton
homepage
repositoryhttps://github.com/ChromeSkullex/simple-xml
max_upload_size
id1196219
size35,814
Sazhelle GM (ChromeSkullex)

documentation

README

Note

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

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

Usage

Example parsing:


let note =
    szl_simple_xml::from_file("./examples/note.xml").expect("Failed to parse simple_xml");

let to = &note["to"][0];
let from = &note["from"][0];
let heading = &note.get_nodes("heading").expect("Missing heading")[0];
let body = &note["body"][0];
let lang = note
    .get_attribute("lang")
    .expect("Failed to get attribute lang");

For additional examples, please see: Docs

Commit count: 30

cargo fmt