且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

JAXB获取元素的所有内容(包括标记和文本)

更新时间:2023-09-03 12:47:10

你可以使用 @XmlAnyElement 注释并指定DOMHandler将DOM片段转换为String值或从String值转换。

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

For完整示例

  • http://blog.bdoughan.com/2011/04/xmlanyelement-and-non-dom-properties.html