I / P-邮政编码:1001-2002
O / P- <邮政编码> 10012002
预期- <邮政编号> 1001-2002 邮政编码>
以下是marshaller属性,
marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
marshaller.setProperty("com.sun.xml.internal.bind.xmlHeaders", "<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE cXML SYSTEM 'http://xml.cxml.org/schemas/cXML/1.2.025/cXML.dtd'>");