quick-xml
High performance xml pull reader for simple enough xmls.
Inspired by xml-rs.
Usage
Carto.toml
[]
="0.1"
extern crate quick_xml;
Example
use ;
let xml = r#"<tag1 att1 = \"test\">
<tag2><!--Test comment-->Test</b>
<tag2>
Test 2
</tag2>
</tag1>"#;
let reader = from_str.trim_text;
let mut count = 0;
let mut txt = Vec new;
for r in reader
Current state
quick-xml has been written to be fast.
On my first tests (200mb+ xmls) it performs much better (minimum 10x) than xml-rs.
While this is a still WIP and only basic xml specifications are implemented, you can already use it for simple enough xmls (no namespaces, no exotic characters etc ...).
This is particularly true when the xml is generated by a known source (e.g. OpenStreetMap).
Todo
There are many xml specifications not implemented yet:
- namespaces
- non-utf8
- parse xml prologue
- XQuries ?
- more checks
- ... and many other things I don't even know!
Contribute
Any PR is welcomed!
I am not an expert in xml specifications, I simply have to work with big xmls. As a result, I may not implement some basic functionalities, simply because I don't know/need them.
License
MIT