serde-xml-rs
serde-xml-rs copied to clipboard
Proof of concept for namespace deserialization
Hi there, I'm hoping to get some feedback with respect to the issue: https://github.com/RReverser/serde-xml-rs/issues/92.
Also, I apologize for the noise due to rustfmt.
Isn't rustfmt
producing some strange line breaks?
XmlEvent::StartElement { ref name, .. } => seed.deserialize(
becoming
XmlEvent::StartElement { ref name, .. } => seed
.deserialize(
I would rather
XmlEvent::StartElement { ref name, .. } =>
seed.deserialize(
wondering if a decision has been made regarding support for namespaces?
@reneherrero, I plan to add support based on a spike I did on https://github.com/punkstarman/serde-xml. Time is lacking atm
@punkstarman No worries, I understand.
To be honest, I think you have an uphill battle. I have a feeling you're going to face the "lowest common denominator" problem due to the dependency on serde. I tried Yaserde but that didn't let me cross the finish line either... Fact of the matter is that XML can be quite elaborate and supporting every feature will likely require a dedicated library. Just my two cents.
I switched to libxml and that got me where I needed to get (also supports XSLT), granted adds an C lib dependency, quite a bit more verbose and nowhere as elegant.
@reneherrero, namespace support was a crunchy problem, but I managed to find a way of supporting it by changing the API ever so slightly.
@punkstarman I have been wrong before... you're one brave dude :)
Let me know when you have something that is testable. Would like to try it with the XML files like these:
- https://raw.githubusercontent.com/iho-ohi/S-101-Test-Datasets/main/S-164/v4/BaseTest/BaseTest/1012C002C3NEWCC/CATALOG.XML
- https://raw.githubusercontent.com/iho-ohi/S-101_Portrayal-Catalogue/main/FeatureCatalog.xml
I want to bring up a discussion on this again. Is it in progress, or can I pick it up?
I'm curious. Is anything happening in this space?