[jdom-interest] Validation error on valid XML

Carl Jensen carldjensen at yahoo.com
Wed Dec 12 15:07:37 PST 2001


I have a strange problem.

1) First, I validate a document that is well formed and the validation comes out fine (no errors).

2) Next, I submit an invalid document and the parser throws the correct exception.

3) Finally, I correct my document back to what is was in number 1, but now I get a new error message (not the one from step 2).

If I restart the servlet (which contains the validation code), everything is OK again (valid documents don't throw an error message).

Anyway, here is my code:

try {
   SAXBuilder builder = new SAXBuilder();
   builder.setValidation(true);

   StringReader xmlreader = new StringReader(xml);
    Document doc = builder.build(xmlreader);

   }
   catch (JDOMException e) {
    System.out.println("Validating exception: " + e);
   }

Does anyone know what is going on?  Any help would be greatly appreciated!

-carl jensen



---------------------------------
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20011212/ab230e43/attachment.htm


More information about the jdom-interest mailing list