JAXB take all content of element (both tags and text)

后端 未结 1 856
独厮守ぢ
独厮守ぢ 2020-12-19 23:03

I have an XML of a forml like this:

Text

Text

How can I map with JAXB annotations all the co
相关标签:
1条回答
  • 2020-12-19 23:41

    You can use the @XmlAnyElement annotation and specify a DOMHandler to convert the DOM fragment to/from a String value.

    For a Complete Example

    • http://blog.bdoughan.com/2011/04/xmlanyelement-and-non-dom-properties.html
    0 讨论(0)
提交回复
热议问题