Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes XML and Related Technologies and the fly likes How do I ignore Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How do I ignore "The entity "raquo" was referenced, but not declared." exceptions?" Watch "How do I ignore "The entity "raquo" was referenced, but not declared." exceptions?" New topic
Author

How do I ignore "The entity "raquo" was referenced, but not declared." exceptions?

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Hi,

I'm using Java 6. I have this code for turning a well-formed XML string (derived from an XHTML doc) into a org.w3c.dom.Document ...



I thought the line, "factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);" would tell the parser to ignore entities it cannot resolve, but I still get the exception



Is there a way to tell the parser to ignore entities it cannot resolve? I would prefer not to create my own custom entity resolver or alter the HTML, but if there is no other way, then so be it.

Thanks, - Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I ignore "The entity "raquo" was referenced, but not declared." exceptions?
 
It's not a secret anymore!