How generate XMLElementWrapper annotation with xjc and customized binding

前端 未结 2 1842
无人共我
无人共我 2020-12-01 05:58

I\'m using JAXB and xjc to compile my XML Schema into Java classes. I do not want to manually edit this generated classes. I have xml schema like that:



        
2条回答
  •  一向
    一向 (楼主)
    2020-12-01 06:32

    Bjarne Hansen developed a plugin for xjc that was able to take care of this. Unfortunately, the link to the original implementation is now dead. However, there is a project by Dmitry Katsubo on github, based on Bjarne's original code with some additional improvements.

    → https://github.com/dmak/jaxb-xew-plugin


    (Just for reference: the original link, now dead: http://www.conspicio.dk/blog/bjarne/jaxb-xmlelementwrapper-plugin)

提交回复
热议问题