serde-xml-rs
serde-xml-rs copied to clipboard
xml-rs based deserializer for Serde (compatible with 1.0+)
The README currently reads "xml-rs based deserializer for Serde (compatible with 0.9+)", while the project description says "xml-rs based deserializer for Serde (compatible with 1.0+)"
I expect the following code to populate val with the default value (0) since its an empty tag, instead it gives error `panicked at 'called `Result::unwrap()` on an `Err` value:...
How can I parse a XML doc and ignore attributes/members that the xml has, that I don't need in Rust? E.g.: ```xml ``` I only care about the `` so...
Hello, I am trying to parse a structure which has the following format ```xml ``` I would expect the following struct to be able to parse the structure : ```rust...
Here's a minimal example: ```rust #[derive(Debug, Serialize, Deserialize)] struct Foo; #[derive(Debug, Serialize, Deserialize)] struct Bar { foo: Foo, } serde_xml_rs::from_str::( &serde_xml_rs::to_string(&Bar { foo: Foo }).unwrap()) .unwrap(); ```
https://github.com/Niedzwiedzw/serde-xml-rs/blob/bfd38c52440cca274819b6f84f12d47ceb438fa3/tests/test.rs#L173 right so this is a showcase of a panic, @RReverser, is this behavior intentional?
Hello, I modified the example slightly. Adding OtherItem into the Project structure give the following error: thread 'it_works' panicked at 'called `Result::unwrap()` on an `Err` value: duplicate field `Item`', /checkout/src/libcore/result.rs:859...
Specifically `test_doctype_fail`. There's also another one that doesn't pass, related to readme, on my machine.
```rust #[derive(Debug, PartialEq, Deserialize, Serialize)] struct Test_XML { t1: i32, t2: i32, wind_speed: i64 } ``` And xml ```rust let s = r##" -600 -600 250 "##; let project: Test_XML...
``` #[derive(Debug, Serialize, Deserialize)] struct Root { #[serde(rename = "$value")] items: Vec, } #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] enum Elems { Foo(String), Bar(String) } fn main() { let a...