[jdom-interest] Finding the DTD

John Muhlestein jmuhlestein at i-link.net
Thu Jul 26 13:23:22 PDT 2001

I believe that the valid URI for the DOCTYPE would be
<file:///C:/testing/item_validation_request.dtd> .

-----Original Message-----
From: Jon Klinginsmith [mailto:jklinginsmith at DigiTerra.com]
Sent: Thursday, July 26, 2001 1:20 PM
To: jdom-interest at jdom.org
Subject: [jdom-interest] Finding the DTD

    I am currently taking an XML String and building a JDOM Document by
using the SAXBuilder.build(Reader) method.  I instantiate the SAXBuilder by
calling the SAXBuilder(boolean) constructor and set validation to true.  I
have been able to parse and create the document when the DTD is within the
XML text, but I get the following Exception when I try to reference an
external DTD:
org.jdom.JDOMException: Error on line 1: Relative URI
"C:\testing\item_validation_request.dtd"; can not be resolved without a
document URI.
I am trying to determine what my <!DOCTYPE ...> element should look like
(specifically the publicID and the systemID)
and I would like to eventually make reference to this DTD with an relative
path instead of the absolute path.
Currently my DOCTYPE looks like the following:
"C:\testing\item_validation_request.dtd" >
I notice in the documentation that there is a SAXBuilder.build(Reader,
String) method, but I have not been successful implementing this method as
Can anyone provide me with some insight on how I should reference this
external DTD in my XML String?
Thanks in advance,

More information about the jdom-interest mailing list