Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ten3roberts/simple-xml
A simple xml parser in rust
https://github.com/ten3roberts/simple-xml
Last synced: 27 days ago
JSON representation
A simple xml parser in rust
- Host: GitHub
- URL: https://github.com/ten3roberts/simple-xml
- Owner: ten3roberts
- License: mit
- Created: 2020-08-07T20:59:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-05T14:56:16.000Z (5 months ago)
- Last Synced: 2024-11-14T09:32:19.669Z (about 1 month ago)
- Language: Rust
- Size: 39.1 KB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple XML
Simple xml is a small crate for reading, parsing and storing xml data## Usage
Example parsing:``` rust
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