Adding namespaces to root element of xml using jaxb

前端 未结 2 1025
無奈伤痛
無奈伤痛 2020-12-10 11:12

I am creating an xml file whose root elemenet structure shuould be like:

   

        
2条回答
  •  不知归路
    2020-12-10 11:22

    In the older Jaxb you can specify additional namespaces using @XmlSeeAlso and in the newer Jaxb you can use @XmlNs in package-info.java see this answer: https://stackoverflow.com/a/63559294/447503

提交回复
热议问题