java - How to skip replacing entity references in XML with XML Simple Framework -


i have xml document © entity represented string.

<url imageartist="" imagesupplier="&copy;salzburg.info "  urldescription="skip line: vatican museums walking tour including sistine chapel, raphael&apos;s rooms , st peter&apos;s"  urllink="http://www.dynamic.viator.com/graphicslib/3731/sitours/skip-the-line-vatican-museums-walking-tour-including-sistine-chapel-in-rome-115004.jpg" urltype="image"/> 

the persister throws exception when comes across "copy" reference , tries deference it:

javax.xml.stream.xmlstreamexception: parseerror @ [row,col]:[1,42] message: entity "copy" referenced, not declared.     @ com.sun.org.apache.xerces.internal.impl.xmlstreamreaderimpl.next(xmlstreamreaderimpl.java:598)     @ com.sun.xml.internal.stream.xmleventreaderimpl.nextevent(xmleventreaderimpl.java:83)     @ org.simpleframework.xml.stream.streamreader.read(streamreader.java:110)     @ org.simpleframework.xml.stream.streamreader.read(streamreader.java:122)     @ org.simpleframework.xml.stream.streamreader.next(streamreader.java:94)     @ org.simpleframework.xml.stream.nodereader.readelement(nodereader.java:111)     @ org.simpleframework.xml.stream.nodereader.readroot(nodereader.java:85)     @ org.simpleframework.xml.stream.nodebuilder.read(nodebuilder.java:84)     @ org.simpleframework.xml.stream.nodebuilder.read(nodebuilder.java:71)     @ org.simpleframework.xml.core.persister.read(persister.java:562)     @ org.simpleframework.xml.core.persister.read(persister.java:499) 

the persister doesn't provide hooks setting properties on xmlinputfactory recommend in post "is there java xml api can parse document without resolving character entities?"

xmlinputfactory inputfactory = xmlinputfactory.newinstance(); inputfactory.setproperty(xmlinputfactory.is_replacing_entity_references, false); 

how can set is_replacing_entity_references false?


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -