"Here I am, World, do your worst!"
"It may sound like you’re inviting bad luck and catastrophe, but what this really means is that you are welcoming life’s challenges with open arms and are willing to bravely take them on."-Atul Pawar.
Carey Evans wrote:The SAXException instance should have more information about what caused the error. Try:
"Here I am, World, do your worst!"
"It may sound like you’re inviting bad luck and catastrophe, but what this really means is that you are welcoming life’s challenges with open arms and are willing to bravely take them on."-Atul Pawar.
Atul Pawar wrote: i have already used that exception in my catch loop and same exception is giving my declared output.
i have already used that exception in my catch loop
William Brogden wrote:
i have already used that exception in my catch loop
If I am going to go to the trouble to make a helpful suggestion, the least you can do is read the suggestion carefully. Jumping to conclusions is one of the leading causes of programmer stumbles.
Bill
"Here I am, World, do your worst!"
"It may sound like you’re inviting bad luck and catastrophe, but what this really means is that you are welcoming life’s challenges with open arms and are willing to bravely take them on."-Atul Pawar.
William Brogden wrote:Now that you are catching SAXParseException you can find out exactly which part of the document is the problem.
Reading the JavaDocs we find the methods getLineNumber and getColumnNumber
catch( SAXParseException e ){
System.out.println("Parse error line: " + e.getLineNumber() + " column: " + e.getColumnNumber() );
e.printStackTrace();
System.exit(1);
}
However, you already have a hint as to the problem being in your DTD:
"The markup declarations contained or pointed to by the document type declaration must be well -formed."
You should probably look at that DTD first.
You should also spend some time browsing the JavaDocs.
Bill
William Brogden wrote:My crystal ball is in the shop for the 10,000 vision checkup so I am unable to see the DTD document referred to in:
"The markup declarations contained or pointed to by the document type declaration must be well -formed."
and
I did get a vision of you checking the line and column information in the SAXParseException and finding that it also points to the DOCTYPE line as the cause of your problem.
Read this wikipedia entry for more about DTD formatting.
Bill
PS. The free trial version of XML SPY (download here) should be able to locate the problem in your DTD / XML. I bought a commercial copy years ago and never regretted it.
Atul Pawar wrote:HI, Anybody got my issue.
Ulf Dittmer wrote:
Atul Pawar wrote:HI, Anybody got my issue.
Yes, we get it. But it seems that you're missing what William is trying to tell you: that the problem seems to be in the DTD, and since we don't have that, there's nothing we can do to help. We might be able to help if you posted the DTD. Of course, once you look at it, you may spot the problem yourself :-)
William Brogden wrote:Try just removing the DOCTYPE line from the XML file, it is not required.
Whoever authored the XML document had in mind that it would be used with a DTD - you should ask the author where the DTD is.
Bill
"Here I am, World, do your worst!"
"It may sound like you’re inviting bad luck and catastrophe, but what this really means is that you are welcoming life’s challenges with open arms and are willing to bravely take them on."-Atul Pawar.
William Brogden wrote:With the assistance of XML-SPY I located all the problems in your DTD.
Your formatting was not quite correct and you had left out the #PCDATA bits.
Bill
William Brogden wrote:With the assistance of XML-SPY I located all the problems in your DTD.
Your formatting was not quite correct and you had left out the #PCDATA bits.
Bill
Our first order of business must be this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|