java - How to handle special characters while unmarshalling xml in JAXB -
my test xml content
<p id="033" num="03">geopotent change high.</p>
and run jaxb unmarshalling, i'm getting exception
09:58:43.748 error [main][net.serviceimpl] parsing error: javax.xml.bind.unmarshalexception- linked exception: [javax.xml.stream.xmlstreamexception: parseerror @ [row,col]: [161,306]message: string "&#]
my jaxb unmarshal source
jaxbcontext jaxbcontext = jaxbcontext.newinstance(cndocument.class); unmarshaller jaxbunmarshaller = jaxbcontext.createunmarshaller(); document = (cndocument) jaxbunmarshaller.unmarshal(xmlfile);
how can escape characters? ()
you jaxb parse error because xml content not well-formed. should 
(with semicolon), not 
.
Comments
Post a Comment