Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
XMLSpy code generation and Qt
Wondering if anyone has experience using XMLSpy's code generation features with Qt. Specifically, are the C++ classes generated by XMLSpy and underlying libraries (e.g., the XML parser) compatible with the Qt framework and Qt Creator?
From a quick overlook at the capability, it doesn't seem that it should be a problem. Just be sure on windows to use the same compilers (same VS version as Qt)
Otherwise you could even try to integrate the code inside your own project
Hi, thanks for responding. I was hoping for a definitive answer from someone who has actually used XMLSpy-generated code with success in the Qt framework, as the question for me is whether I should spend $1,000+ to purchase XMLSpy (which I want principally for the code generation functionality). I'd hate to pay that kind of $$$ only to find out that it was futile.
I have used CodeSynthesis XSD in the past with Visual Studio. I understand that CodeSynthesis can be made to work with Qt, but it has licensing limitations that I can't abide by for my current project. I'm just an intermediate-level, hobbyist programmer, so the prospect of having to do a deep dive into the guts of Qt in order to get XMLSpy-generated code working is a bit daunting.
Do you have an example of such code ?
Another channel where you can ask is irc at #qt or the interest mailing list
[quote author="SGaist" date="1405631660"]Do you have an example of such code ?[/quote]
Sadly, no. I foolishly allowed my 30-day evaluation period for XMLSpy to expire before I actually tried to generate any code from a schema.
[quote]Another channel where you can ask is irc at #qt or the interest mailing list[/quote]
Thanks. I'm also going to try posting on Altova's forum. maybe even contact their sales staff. If I get a definitive answer, I'll post it here.
I suppose, in a pinch, I could write the XML loading/parsing/validating code as a Visual Studio app, then launch that app from the main Qt code and get at the data via interprocess communication. But that's complicating things for an intermediate-level coder such as myself. :)
You also have the Qt XML module if you want
[quote author="SGaist" date="1405668226"]You also have the Qt XML module if you want[/quote]
True, that will load and parse an xml instance document and validate it against the schema. But it doesn't go that last mile: creating schema-specific c++ classes and automatically mapping the DOM document data to the custom classes. This last part is tedious to do manually because you have to recreate all of the schema semantics in c++, and every time the underlying schema changes, you have to amend your c++ classes. It's not that it can't be done, but the automatic code generation of XMLSpy or CodeSynthesis is a huge time saver. (That's why I'm willing to pay $1000 for XMLSpy on a hobby project....to avoid potentially several hundred hours of tedium).