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. This can inherently be a bit slower than other libraries, but it allows for more complex XML structures to be parsed.
Get started
To get started, we recommend you check out the XMLity book and the documentation.
Example
- Add XMLity and XMLity-compatible (de)serializer library. In this example we use
xmlity-quick-xml
.
[]
= { = "0.0.6", = ["derive"] }
= "0.0.6"
- Write defintions and use:
extern crate xmlity_quick_xml;
use ;;
;
;
let person = Person ;
let xml = to_string.expect;
assert_eq!;
let person: Person = from_str.expect;
assert_eq!;
assert_eq!;