Closed snoop244 closed 3 months ago
I cannot reproduce that. When I fixed your model (append @
to renames that corresponds to attributes) everything worked as expected. So I recommend you to check your XML / model for misprints.
Thanks. I had tried adding back the "@" for attributes, but it gave me a different error. Your working code used the proper quick_xml::de::from_reader()
whereas mine mistakenly used the serde_xml_rs from_reader(). When I changed that, it worked as-expected.
Thanks for the very speedy response.
I don't work with a lot of XML, so I'm not sure if Business Process Modeling Notation breaks some rules, but I doubt it.
In my toy project I pass it a small BPMN file and ask it to parse it to my data structures. I have one type of element: that shows up multiple times, like many other BPMN elements but, for some reason, it generates the duplicate field error while the other repeated elements do not. What is unique about this type of element in BPMN XML is that it is self-closing. Other than that, I can't explain why I get
Custom { field: "duplicate field
sequenceFlow" }
If I remove the other instances of this tag, leaving only 1 instance, it works as expected. If I have duplicates of any other element, they work as expected.
main.rs:
my types in bpmn.rs:
my xml file: