Can I force JAXB not to convert " into ", for example, when marshalling to XML?

后端 未结 14 1967
情深已故
情深已故 2020-11-29 09:27

I have an Object that is being marshalled to XML using JAXB. One element contains a String that includes quotes (\"). The resulting XML has " where t

14条回答
  •  無奈伤痛
    2020-11-29 09:34

    I checked the XML specification. http://www.w3.org/TR/REC-xml/#sec-references says "well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. " so it appears that the XML parser used by the legacy system is not conformant.

    (I know that it does not solve your problem, but it is at least nice to be able to say which component is broken).

提交回复
热议问题