serde-xml-rs
serde-xml-rs copied to clipboard
Serializing should use the XML library instead of printing strings
When I initially wrote the Serializer
I was just using write!()
to write the XML as a string to an internal io::Writer
.
Ideally we should be using the xml-rs
library instead so can guarantee the generated XML is syntactically correct, plus we'd get things like pretty-printing for free.
@oli-obk, any chance you can add the "Refactor" label to this?
I could start working on it.
You may want to hang out until we merge #36. I've gone through and added support for serializing all the serde data types, so we'd end up stepping on each others toes and have annoying merge conflicts.
After that you can just go through and swap out write!()
statements with pushing an XML event to a xml_rs::EventWriter
. It shouldn't be overly difficult because all the structure is there, we just need to swap out where things get written to.