Generate Java classes with JAXB from a DTD file - how can I modify the DTD?

前端 未结 2 1855
刺人心
刺人心 2020-12-17 03:36

I want to generate Java classes from a dtd file using JAXB.

The dtd looks like this:


    

        
2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-17 04:02

    xjc -dtd -d generatedsrc -p com.examples log4j.dtd
    

    will generate the classes in directory generatedsrc and the package used will be com.examples.

    you can find more information here: http://www.javaworld.com/community/node/7622

提交回复
热议问题