Home

Awesome

Choose your XML

Crates

xml-rsVersion CI
quick-xmlVersion CI
xml5everVersion CI
sxd-documentVersion CI

Features

Feature/Cratexml-rsquick-xmlxml5eversxd-document
Document type definitionNoNoPartialPartial
NamespacesYesYes?Yes
Numeric character referenceYesYesYesYes
XML entity referenceYesYesYesYes
HTML entity referenceNoNoYesNo
DTD entity referenceNoNoNoNo
xml:spaceNoNoNoNo
Non UTF-8 inputNoNoNoNo
XPathNoNoNoYes
XQueryNoNoNoNo
Event parserYesYesYesNo
Push parserNoNoYesNo
Error recoveryNoNoPartialNo
DOMNoNoYesYes
WritingYesYesYesYes

You can test features by yourself using corresponding example:

cargo run --example crate_name file_path

# example
cargo run --example quick_xml data/small.xml

Performance

test quick_xml_large     ... bench:   1,899,961 ns/iter (+/- 19,762)
test quick_xml_medium    ... bench:     606,169 ns/iter (+/- 12,840)
test quick_xml_small     ... bench:       6,861 ns/iter (+/- 337)

test sxd_document_large  ... bench:      failed
test sxd_document_medium ... bench:   2,556,833 ns/iter (+/- 53,307)
test sxd_document_small  ... bench:      39,422 ns/iter (+/- 1,562)

test xml5ever_large      ... bench:   8,318,061 ns/iter (+/- 38,335)
test xml5ever_medium     ... bench:   7,403,966 ns/iter (+/- 39,070)
test xml5ever_small      ... bench:      44,433 ns/iter (+/- 528)

test xmlrs_large         ... bench:  26,283,106 ns/iter (+/- 155,005)
test xmlrs_medium        ... bench:  13,513,665 ns/iter (+/- 15,710)
test xmlrs_small         ... bench:      92,391 ns/iter (+/- 149)

You can run benchmarks by yourself using cargo bench.

* Note that sxd-document generates a whole DOM.

Contributing

Any suggestions and patches are welcome. Especially from crate authors.

License

This repo is licensed under MIT license.