Monday, January 18, 2010

jaxb xml to java bean

Jaxb (java 6) provides xjc which can compile schema file and generate the java bean with JAXB annotation. But xjc only works with schema. More info about xjc

If you only have the xml which does not have a schema, you can use trang to generate it.

The command for trang is like

java -jar trang.jar XXX1.xml XXX2.xsd

No comments:

Post a Comment