pocoproject / poco

The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
https://pocoproject.org
Other
8.22k stars 2.13k forks source link

Proposal: XML schema data binding tool #4614

Closed ethindp closed 1 month ago

ethindp commented 1 month ago

Is your feature request related to a problem? Please describe. N/A

Describe the solution you'd like It would be really neat if Poco had an XSD data binding tool that consumed an XML schema and generated code that used Poco::XML to handle parsing, serialization, and validation.

Describe alternatives you've considered Currently, for C++, there are to my knowledge very few tools that allow someone to do this. Tools such as CodeSynthesis XSD do exist, but either they require you to pull in yet another XML parsing library or they have unfavorable license terms (i.e. CodeSynthesis XSD requires that your code be licensed under the GPL or one of the licenses it's OSS exception allows, or that you purchase a license from CodeSynthesis).

Additional context I'm writing a tool that needs to consume a quite complex XML document. Although I could manually write the parsing code by hand, the document has so many attributes and elements that it'd be a nightmare having to manually write all of that code even with the SAX parser. I doubt I'm the only one who needs to consume such documents, and Poco's XML API is extremely pleasant to work with, and having this kind of tool in the toolbox would be really nice because it'd mean I wouldn't need to rely on a third-party tool or XML parser/validator and could just use Poco's.

obiltschnig commented 1 month ago

We have built something as part of our commercial POCOpro C++ Frameworks.

Given the clusterf*ck of complexity that is XSD, I don't think someone will build something on unpaid time...