This repository was archived by the owner on May 6, 2020. It is now read-only.

Description
For xml:
<a>
<b>
<c>5<c/>
<b/>
<other>
<d>6<d/>
<other/>
<a/>
with Rust structures:
#[derive(Deserialize, Debug)]
struct a {
other: Vec<other>,
}
#[derive(Deserialize, Debug)]
struct other {
d: i32,
}
serde_xml will fail with error at runtime (Expected text), and it is fixed by declaring an empty struct and adding a field of that type to a atructure a.
#[derive(Deserialize, Debug)]
struct Empty;
#[derive(Deserialize, Debug)]
struct a {
b: Empty,
other: Vec<other>,
}
#[derive(Deserialize, Debug)]
struct other {
d: i32,
}