Java uses jaxb to convert xml directly to ben

First there is an xml file.

Use trang-20091111.jar to convert xml file into .xsd file (jar download address: http://mvnrepository.com/artifact/com.thaiopensource/trang)

 


 

 

After producing new.xml to new.xsd file 

Use the following command to generate the corresponding bean.



 

 

 

Note: The encoding of the files produced here is gbk. Looking for how to produce UTF-8 file format. Anyone who knows can tell me.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326913908&siteId=291194637