16 releases (8 breaking)
0.11.0 | Apr 21, 2021 |
---|---|
0.10.1 | Mar 30, 2021 |
0.7.0 | May 11, 2020 |
0.5.3 | Mar 8, 2020 |
#84 in #xml-parser
24 downloads per month
61KB
1.5K
SLoC
trashy-xml
A non-spec compliant xml parser that does not stop parsing when encountering errors.
Example
use trashy_xml::XmlParser;
// Gets each open element matching "this_element"
// then prints the debug representation of its attributes.
let parsed = XmlParser::str("<this_element attribute=\"value\" />").parse();
for token in parsed.elements_from_name("this_element") {
dbg!(token.attributes());
}
lib.rs
:
A non-spec compliant xml parser that does not stop parsing when encountering errors.
Examples
use trashy_xml::XmlParser;
// Gets each open element matching "this_element"
// then prints the debug representation of its attributes.
let parsed = XmlParser::str("<this_element attribute=\"value\" />").parse();
for token in parsed.elements_from_name("this_element") {
dbg!(token.attributes());
}
Dependencies
~0.6–0.8MB
~15K SLoC