Is there a standard Java utility to parse XSD files at runtime?
- by Andrew
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.