serde-xml-rs
xml-rs based deserializer for Serde (compatible with 0.9+)
Usage
Use serde_xml_rs::from_reader(...)
on any type that implements std::io::Read
as following:
extern crate serde_derive;
extern crate serde;
extern crate serde_xml_rs;
use from_reader;
Alternatively, you can use serde_xml_rs::Deserializer
to create a deserializer from a preconfigured xml_rs::EventReader
.
Parsing the "value" of a tag
If you have an input of the form <foo abc="xyz">bar</foo>
, and you want to get at thebar
, you can use the special name $value
:
Parsed representations
Deserializer tries to be as intuitive as possible.
However, there are some edge cases where you might get unexpected errors, so it's best to check out tests
for expectations.