Open miguelsilva5989 opened 1 year ago
Hello,
I you case I wanna to wrote like it to parse the XML:
Task {
#[yaserde(attribute)]
class: String,
#[yaserde(attribute)]
documentation: String,
#[yaserde(attribute)]
name: String,
#[yaserde(attribute)]
taskkey: String,
#[yaserde(attribute)]
x: usize,
#[yaserde(attribute)]
y: usize,
parameter: Parameter
}
struct Parameter {
#[yaserde(attribute)]
name: String,
#[yaserde(attribute)]
type: String,
parameters: Vec<Parameters>,
root: Option<Root>,
}
is it relevant ?
I'm having some trouble trying to find the best way of deserializing the following XML. Inside TaskList the Task tags are the same but their inner children are different. Is there any way of parsing this in order to differentiate between 2 tasks based on their class attribute?
I was playing around with Enums and such but I don't see any way of doing this except implementing the deserialize method manually. Was trying to find a similar example in the examples folder but I don't see nothing like this.
Thanks in advance (I'm quite new to rust so I am sorry if this question seems silly)