【发布时间】:2017-03-28 09:51:39
【问题描述】:
我的测试 xml 内容
<p id="033" num="03">geopotent change high.</p>
我运行 Jaxb Unmarshalling,但出现异常
09:58:43.748 ERROR [main][net.ServiceImpl] Parsing Error:
javax.xml.bind.UnmarshalException- with linked exception:
[javax.xml.stream.XMLStreamException: ParseError at [row,col]:
[161,306]Message: String "&#]
我的 Jaxb 解组源是
JAXBContext jaxbContext = JAXBContext.newInstance(CnDocument.class);
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
document = (CnDocument) jaxbUnmarshaller.unmarshal(xmlFile);
如何转义这些字符? ()
【问题讨论】: