quick-xml icon indicating copy to clipboard operation
quick-xml copied to clipboard

Consider whether a DOM wrapper would be a useful addition

Open dralley opened this issue 9 months ago • 2 comments

@Tafia wrote and @ColinKinloch contributed to an experimental DOM wrapper API here (which is now updated here)

Originally the PR was closed because the minidom crate was using quick-xml. As of right now however they seem to be using a different library.

I'm opening this mostly so that we don't completely lose track of the work, which might be useful. But that remains to be seen. We ought to determine

  1. whether it's a useful addition to the ecosystem, which already has a few crates that handle the DOM
  2. whether this crate would be the correct place for it to live if it was (I suspect it probably would not be, as long as no deep integration is required)

dralley avatar Mar 27 '25 14:03 dralley

Since updating that branch I've tested out minidom and found it to be unsuitable for my use as it mandates namespaces (<a xmlns="ns"></a>). Having the ability to "flatten" unhandled values like in serde_json would be extremely nice.

ColinKinloch avatar Mar 27 '25 15:03 ColinKinloch

I have a dom branch with a different approach (very WIP), and yes, we definitely need a DOM type to be able to create a custom Buffer for serde if that PR will be finished

Mingun avatar Mar 27 '25 20:03 Mingun