[xsd-users] generating C++ class from XML instance document (not
schema)
Boris Kolpackov
boris at codesynthesis.com
Sat May 31 04:45:02 EDT 2014
Hi Leon,
Leon <leon at securigy.com> writes:
> It is very large and comprehensive schema for cameras.
>
> 1. Is that something that you think you can compile with your XSD compiler?
This is actually a very tame schema, compared to other stuff out there ;-).
I just tried to compile it and there doesn't seem to be any issues.
> 2. If I generated XML file based on this schema, is there any way or tools
> that I can generate C++ classes from this XML file? (and not from schema -
> because my XML file includes only a fraction of what's in the schema)
Generally, trying to get from XML to XML Schema (or C++ classes) is a very
error-prone process except for really simple cases. If you still want to
go this route, then I think your best bet is to look for an XML-to-XML
Schema tool rather than XML-to-C++. I personally haven't used any but
this SO page has some recommendations:
http://stackoverflow.com/questions/74879/any-tools-to-generate-an-xsd-schema-from-an-xml-instance-document
Boris
>
> Leon
More information about the xsd-users
mailing list