You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Trevor Griffiths <tg...@tcmg.com> on 2001/04/03 18:26:30 UTC

Newbie - Digester/Sax Parsing Error

Hi,

I'm doing some simple tests and set up with Digester to get familiar with it
before starting in for real.

The following xml produces a java.net.MalformedURLException error when
digester.parse attempts to parse it.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE request SYSTEM "C:\Documents and
Settings\tgriffiths\Desktop\DigesterTest\digesterTest.dtd">
<request>
	<fruit>orange</fruit>
	<veg>carrot</veg>
</request>


I've tried it with and without the DOCTYPE definition. I have
digestor.setValidating(false).

I haven't used digester.register.

Any suggestions, corrections, etc.

Thanks

Trev...


Re: Newbie - Digester/Sax Parsing Error

Posted by Martin Cooper <ma...@tumbleweed.com>.
You have to prefix the path to your DTD with "file:" to make it a valid URL.

--
Martin Cooper


----- Original Message -----
From: "Trevor Griffiths" <tg...@tcmg.com>
To: <st...@jakarta.apache.org>
Sent: Tuesday, April 03, 2001 9:26 AM
Subject: Newbie - Digester/Sax Parsing Error


> Hi,
>
> I'm doing some simple tests and set up with Digester to get familiar with
it
> before starting in for real.
>
> The following xml produces a java.net.MalformedURLException error when
> digester.parse attempts to parse it.
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE request SYSTEM "C:\Documents and
> Settings\tgriffiths\Desktop\DigesterTest\digesterTest.dtd">
> <request>
> <fruit>orange</fruit>
> <veg>carrot</veg>
> </request>
>
>
> I've tried it with and without the DOCTYPE definition. I have
> digestor.setValidating(false).
>
> I haven't used digester.register.
>
> Any suggestions, corrections, etc.
>
> Thanks
>
> Trev...
>