I need to generate XSD file as descriptor of standard. Is it possible to autogenerate XSD from Java object? Of course auto开发者_开发技巧mated util cannot make complete and fulyl accurate XSD file, but it woild be helpful. So is there any Java libraries for this purpose?
Java6 ships with a tool called schemagen
(see docs) for exactly this purpose. It attempts to generate XML Schema from Java source code.
Yes, off top of my head I can name JAXB and XMLBeans:
http://www.oracle.com/technetwork/articles/javase/index-140168.html
http://xmlbeans.apache.org/
精彩评论