[jdom-interest] DOCTYPE Error

Arvind Ramankole ARamankole at npr.org
Mon Aug 25 12:40:45 PDT 2003

Hi All,
         I  am new to jdom and using SAXBuilder, I am getting following
        org.jdom.JDOMException: Error on line 1 of document
http://www.mysite.org/xml/StockReport.dtd: The
 markup declarations contained or pointed to by the document type
declaration must be well-formed.

    When I include the DTD inside the XML file it works fine with out any
errors. It also works when I take out the DOCTYPE from the xml file.
    please advice.


XML file----
   <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE StockReport SYSTEM "http://www.mysite.org/xml/StockReport.dtd:">

DTD file---
  <!DOCTYPE StockReport [
<!ELEMENT StockReport (Inventory+)>
<!ELEMENT Inventory (Item,Available)>
<!ELEMENT Available (#PCDATA)>

More information about the jdom-interest mailing list