This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Hi, I am about to start out on a large-ish Java application processing XML files whose content is defined by a complicated XML Schema. I would like to be able to generate Java classes to represent the elements described in the Schema. To write these entirely by hand would be a very onerous task, so I hope that an automated tool will be able to do some of the process. I have investigated JAXB, Castor and BreezeFactor tools for generating Java from an XML Schema. None of these could cope with our schema. One problem was that none of them supported simpleType definitions whose content was a list.
Are there any other such tools that I should be considering?
How fast are the existing tools evolving?
Is it likely that they will support my requirements in the near future?
Is there another approach that I could take to the problem?
All suggestions gratefully received. P.S. Here's an example of what JAXB and Castor didn't like...
[ November 25, 2002: Message edited by: Peter Chase ]
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Hi Peter, I can see one solution here: apply a simple XML transformation to conform to what is supported by Castor or JAXB to read the input XML into Java objects. To serialize, just do the reverse (another XSLT). I'm sure you'll find lots of experts in this forum to help you on the best way to do this. Cheers
Joined: Oct 30, 2001
I can see one solution here: apply a simple XML transformation to conform to what is supported by Castor or JAXB to read the input XML into Java objects. To serialize, just do the reverse (another XSLT).
Do you mean transform the schema itself or the XML data (conforming to the schema), or both?
I'm sure you'll find lots of experts in this forum to help you on the best way to do this.
When its comes to validation against a Schema!.. my suggestion could be to write an XSL as a validator against XML. I just attempted it but haven't completed it fully due to other works. With XSL you have an advantage of throwing out user understandble error, than the one that comes out of xerces or sun MSV. Rgds Balaji