Is there a standard Java utility to parse XSD files at runtime?
Posted
by Andrew
on Stack Overflow
See other posts from Stack Overflow
or by Andrew
Published on 2009-07-23T14:21:38Z
Indexed on
2010/04/07
0:33 UTC
Read the original article
Hit count: 397
I've been looking around for a way to programmatically parse XSD files to generate an XML mapping so that I can take any XSD file and create a parser that will parse any XML file that conforms to it, and my google-fu has been coming up short.
XSOM looks promising, as it will parse an XSD file and make all its attributes available in a straight forward way.
Are there any other options or standard libraries available that will produce an XML file parser from an XSD file?
[Conclusion] Thanks everyone for your responses, they were a real help. I was able to write implementations using JAXP, Eclipses EMF and in XSOM that all worked as desired.
JAXP was very straight forward and easy to learn and do. EMF was actually a pain to get going properly, there were so many jars that had to be included for it to work standalone that I would not recommend it. XSOM was even simpler than the JAXP implementation, so I went with it in the end.
© Stack Overflow or respective owner