Generating Java classes from XML file
How can I get java classes from an xml file?
In开发者_StackOverflow社区 this situation, I don't have an XML schema and this way I can't use JAXB, Castor or other xml binding API as far as I know.
You can generate schema from XML file using certain tools. Then, use Apache XMLBEANS to create your classes.
XStream is great for XML -> objects and vice versa. Fast, lightweight, and works well without any schema.
Altova is also the best to generate java Classes from XML/XSD
精彩评论