Introduction to XMLity

XMLity is a (de)serialization library for XML, inspired by serde and improves upon XML (de)serialization libraries such as yaserde and quick-xml by providing a more flexible API that is more powerful, utilising primairly a trial and error approach to parsing XML.

Want to get started? Click here.

Comparison

Why does XMLity need to exist? Doesn't other XML-parsers/deserializers exist in Rust and why should I use/contribute to XMLity instead? To answer these questions, we've provided a feature chart below:

If something stated here is wrong, please submit a PR! It is not guaranteed to be correct, but should be a pretty fair description. The list tries to rank the features in order of importance, but it is ofcourse subjective.
FeatureXMLityYaserdequick-xml
(serde feature)
Namespace supportYesYesNo
Enum string valueYesYesYes
Enum number valueNo?YesYes
Trial and error deserializationYesNoNo *
Standalone named elements
(inherit element names from types)
YesNoNo
Order-based deserializationYesNoYes
XSD GeneratorNo +YesYes
Multiple reader/writer implementation supportYes **NoNo

+   Being worked on.

?   Planned.

*   While quick-xml has partial support, it is insufficient for any range of possible values. It only supports textual nodes, meaning trial and error deserialization is not possible for proper elements.

**   While XMLity does have support for multiple readers/writers, the only current one that exists is the official one using quick-xml, even if others are supported due to the data-model being completely deconnected from any other library. This should change in the near future as support for xml-rs is planned.