[Ext] Re: [xsd-users] DLLs and --generate-element-type --generate-element-map

Boris Kolpackov boris at codesynthesis.com
Fri Jul 17 06:12:20 EDT 2026


Nicolas Weidmann <n.weidmann at lombardodier.com> writes:

> A ADL serialize for a future release of XSD ? Or parse/serialize traits ?

I think if we decide to support this, the most sensible way would be to
just fix the element types feature to support polymorphism. I've filed
an issue to track this:

https://github.com/codesynthesis-com/xsd/issues/3


> In order to make life more simpler for me, I am planning to write a
> small app that will scan the XSDs for root elements and will create
> the helpers I need based on the different parseMyObject / serializeMyObject.

BTW, I think you could implement your own parsing with support for
polymorphism for element maps non-invasively. We generate public
static functions that return the element name and namespace and
the element's type alias is also available. So you could implement
your helper parse() template to do as polymorphism-supporting parsing
functions do instead of calling the element types' from DOMElement
constructor.

The same approach should work for serialization.



More information about the xsd-users mailing list