[jdom-interest] validation + classpath

Kesav Kumar kesavk at voquette.com
Mon Oct 23 09:23:14 PDT 2000

There is a nice way of including DTD which I did for my work.

java.net.URL url = this.getClass.getResource("sample.dtd");
Document.setDocType(new DocType("MainElement", url.toString());

Now you can validate the document.

Kesav Kumar
Software Engineer
Voquette, Inc.
650 356 3740
mailto:kesavk at voquette.com

-----Original Message-----
From: olivier refalo [mailto:orefalo at yahoo.com]
Sent: Sunday, October 22, 2000 9:26 PM
To: jdom-interest at jdom.org
Subject: [jdom-interest] validation + classpath

I have a simple, yet interesting question...

As a new Jdom/Xml user I am trying to validate an XML
document with a DTD stored in the CLASSPATH.

Is there any way to set the DTD for a given document ?
I was thinking about a method like:

Document.setDTD(InputStream is);

Any suggestions are welcome.

Olivier Refalo / Software engineer
http://www.crionics.com/orefalo / mailto:orefalo at yahoo.com
Java: A simple, object oriented, distributed, interpreted, robust, secure,
architecture neutral, portable, high-performance, multi-threaded, and
dynamic language.
Cited from (The Java Language: A White Paper) by SUN Microsystems.

Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
To control your jdom-interest membership:

More information about the jdom-interest mailing list