更新时间:2023-09-03 12:47:10
你可以使用 @XmlAnyElement 注释并指定DOMHandler将DOM片段转换为String值或从String值转换。
@XmlAnyElement
You can use the @XmlAnyElement annotation and specify a DOMHandler to convert the DOM fragment to/from a String value.
For完整示例
JAXB 获取元素的所有内容(标签和文本)
JAXB获取元素的所有内容(包括标记和文本)