[jdom-interest] weirdness when calling new SAXBuilder().build(url)

Amy Sun amys at infospace.com
Fri Apr 27 15:26:52 PDT 2001

Hi.  I'm new to JDOM.  I'm playing with some test code, and I'm seeing
something weird.  Basically,
Document doc = new SAXBuilder().build(file) works fine,
but SAXBuilder().build(url) does not seem to work for me.

When I directly type a url in the browser, I get

<?xml version="1.0" encoding="iso-8859-1"?>

i.e. 2.5/FOO.dtd and the root is FOOResults.

But when I print doc.toString() (doc = new SAXBuild().build(url)), I get

[Document: [DocType: <!DOCTYPE result-set SYSTEM
"http://www.FOO.com/dtd/affiliate/1.1/FOO.dtd">] Root - [Element:

i.e. 1.1/FOO.dtd and the root is result-set.

It's picking up an older dtd.  How could this happen?

Your help is greatly appreciated.


More information about the jdom-interest mailing list