Using an adapter to marshal a class to a root element with MOXy or any other JAXB implementation

后端 未结 1 1189
醉酒成梦
醉酒成梦 2021-01-13 19:10

I have a class which extends the CompositeConfiguration class from Apache Commons Configuration. I am trying to marshal it to XML using MOXy. I have created an XML adapter

相关标签:
1条回答
  • 2021-01-13 19:49

    EclipseLink MOXy and other JAXB (JSR-222) providers do not apply an XmlAdapter to the root object being marshalled. You can explicitly call the adapter logic before doing a marshal or after doing an unmarshal.

    0 讨论(0)
提交回复
热议问题