JAXB Marshaller从字符串中跳过“-”(连字符)

时间:2018-12-04 20:45:21

标签: java jaxb

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'>");

0 个答案:

没有答案