Dealing with poorly designed XML with JAXB

后端 未结 4 968
野的像风
野的像风 2021-01-13 05:21

I\'m currently working on replacing a legacy system with JAXB and I\'m running into problem with parsing the XML. The number one requirement of the system is that it must be

4条回答
  •  暖寄归人
    2021-01-13 05:51

    Write a meta-XSD in freemarker/velocity or the like. It can define the 256 types as subtypes of some parent type using a for loop. If you want to fully automate, you can write a maven plugin to generate the XSD from the freemarker and the run generate-sources on the result.

提交回复
热议问题