[jdom-interest] not validating SystemID
Sandro Böhme
s.boehme at inovex.de
Fri Oct 5 05:34:52 PDT 2001
I have'nt get it running with an EntityResolver because of the following
Exception:
org.jdom.JDOMException: Error on line 1 of document
file:/d:/svg-20000303-stylable.dtd: org.apache.crimson.parser/P-059 [dtd]
But it does'nt matter because I dont need an InputSource dependent of a
SystemID. I just dont need a SystemID.
If I wrap the Reader with an InputSource and give that InputSource to the
build method, than it works fine. The SystemID is ignored.
(new SAXBuilder(false)).build( new InputSource( reader ) );
JavaDoc of the InputSource class desc.:
"...The SAX parser will use the InputSource object to determine how to read
XML input. If there is a character stream available, the parser will read
that stream directly; if not, the parser will use a byte stream, if
available; if neither a character stream nor a byte stream is available, the
parser will attempt to open a URI connection to the resource identified by
the system identifier. ..."
more exactly the JavaDoc of InputSource.setSystemId:
"...the parser will attempt to open a connection to the URI only if there is
no byte stream or character stream specified..."
Thanks for the infos!
Sandro Böhme
----- Original Message -----
From: "Jason Hunter" <jhunter at servlets.com>
To: "Sandro Böhme" <s.boehme at inovex.de>
Cc: <jdom-interest at jdom.org>
Sent: Friday, October 05, 2001 12:26 AM
Subject: Re: [jdom-interest] not validating SystemID
> Check out SAXBuilder.setEntityResolver(). That's the trick.
>
> -jh-
>
> Sandro Böhme wrote:
> >
> > Hi,
> >
> > is there a way to prevent JDOM from parsing the systemID in the doctype?
> > The systemID is a URL to the web. But on parsing time I cannot connect
to
> > the web and I do not need to
> > validate the XML file.
> > I tried to set the validation of the SAXBuilder to false, but it did not
> > solve my problem.
> > Thanks for any advice you can give me.
> >
> > Sandro
> >
> > _______________________________________________
> > To control your jdom-interest membership:
> >
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com
>
>
More information about the jdom-interest
mailing list