I generate the following xml stream on a server:
and have the following code to read it (the stream is shared as a
string "result"):
My issue is: It works "most" of the time without any problem. But from time to time (quite randomly actually), I have the following error:
org.jdom.input.JDOMParseException: Error on line 21 of document http://www.w3.org/TR/html4/frameset.dtd: The declaration for the entity "HTML.Version" must end with '>'.
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:530)
I don't understand why this address
http://www.w3.org/TR/html4/frameset.dtd is mentioned. The link is active but it takes ages to reach it. Is there a way to avoid the dtd validation in this context? I thought the line SAXBuilder serviceSxb = new SAXBuilder() was enough to avoid it.
Is there a solution to get a more robust procedure to parse my xml?
I would really appreciate some help here.
Thanks!