dcsimg
SAXException regarding the external dtd, even though it is a non-validating (JAXP) parser
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Manju_R
Posted On:   Thursday, June 20, 2002 03:05 PM

I set my parser as non-validating SAX Parser. But I am still getting this error:

"Undable to parse due to exception occured org.xml.sax.SAXParseException: Relative
URI "graph.dtd"; can not be resolved without a document URI."

I implemented an EntityResolver class for the XMLReader object. What else should I code inside the resolveEntity()? Also Please give suggestions on how to use EntityResolver to locate a local dtd file.

Re: SAXException regarding the external dtd, even though it is a non-validating (JAXP) parser

Posted By:   Roseanne_Zhang  
Posted On:   Tuesday, September 3, 2002 07:45 AM

I had the same problem before. The trick is use
System.out.println(systemId);

in your resolveEntity() method to see the required format. You can put your local dtd in place of your xml to see it get the complain or not.



Then you can use this one in your resolveEntity() method. In this way, you learn how to do it by yourself. :)

About | Sitemap | Contact