serde-xml-rs icon indicating copy to clipboard operation
serde-xml-rs copied to clipboard

Proof of concept for namespace deserialization

Open estk opened this issue 6 years ago • 8 comments

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.

estk avatar Jan 30 '19 18:01 estk

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(

punkstarman avatar Jan 31 '19 22:01 punkstarman

wondering if a decision has been made regarding support for namespaces?

reneherrero avatar Nov 05 '22 15:11 reneherrero

@reneherrero, I plan to add support based on a spike I did on https://github.com/punkstarman/serde-xml. Time is lacking atm

punkstarman avatar Nov 07 '22 14:11 punkstarman

@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 avatar Nov 07 '22 15:11 reneherrero

@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 avatar Nov 08 '22 15:11 punkstarman

@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

reneherrero avatar Nov 09 '22 13:11 reneherrero

I want to bring up a discussion on this again. Is it in progress, or can I pick it up?

oneslash avatar Apr 21 '23 18:04 oneslash

I'm curious. Is anything happening in this space?

wt avatar Nov 16 '23 21:11 wt