Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

[jdom-interest] Re: jdom-interest Digest, Vol 6, Issue 1

Kashif Riaz

2005-01-04


Hi,

You can simply use the URI of the DTD as the second parameter in the
build() method:

SAXBuilder builder = new SAXBuilder();
Document doc = builder.build(myInputStream, "file:///" + fullPathToDtd
+ dtdFileName);

API: http://www.jdom.org/docs/apidocs/org/jdom/input/SAXBuilder.html

That should work.

Kashif.


On Sun, 2 Jan 2005 12:00:03 -0800, jdom-interest-request@(protected)
<jdom-interest-request@(protected):
> Send jdom-interest mailing list submissions to
>      jdom-interest@(protected)
>
> To subscribe or unsubscribe via the World Wide Web, visit
>      http://www.jdom.org/mailman/listinfo/jdom-interest
> or, via email, send a message with subject or body 'help' to
>      jdom-interest-request@(protected)
>
> You can reach the person managing the list at
>      jdom-interest-owner@(protected)
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of jdom-interest digest..."
>
> Today's Topics:
>
>   1. validate document without DOCTYPE declaration (John C Cartwright)
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 01 Jan 2005 20:32:15 -0700
> From: "John C Cartwright" <John.C.Cartwright@(protected)>
> Subject: [jdom-interest] validate document without DOCTYPE declaration
> To: jdom-interest@(protected)
> Message-ID: <9fdfd1d4.d1d49fdf@(protected)>
> Content-Type: text/plain; charset=us-ascii
>
> Hello All,
>
> I'm trying to find a way to validate a document that does not include the DOCTYPE
> declaration. The URL for the DTD is known at runtime, but is not imbeded in the XML
> document.
>
> Can anyone tell me a way to do this?
>
> Thanks!
>
> -- john
>
> ------------------------------
>
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
>
> End of jdom-interest Digest, Vol 6, Issue 1
> *******************************************
>
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.