SAXBuilder dtd location

View: New views
3 Messages — Rating Filter:   Alert me  

SAXBuilder dtd location

by Bernd Müller-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I try to build documents with the SAXBuilder with turned on validation. I have a bunch of xml-documents that are spread through various sub folders. Therefore, I want the SAXBuilder to look at a given position for the dtd. How do I tell the SAXBuilder where to find the dtd?

Regards,
Bernd

_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...

Re: SAXBuilder dtd location

by Victor Toni-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Bernd,

On 03.07.2009 21:01, Bernd Müller wrote:
> I try to build documents with the SAXBuilder with turned on
> validation. I have a bunch of xml-documents that are spread through
> various sub folders. Therefore, I want the SAXBuilder to look at a
> given position for the dtd. How do I tell the SAXBuilder where to find
> the dtd?
The way to go would be to implement the EntityResolver interface:

http://java.sun.com/j2se/1.5.0/docs/api/org/xml/sax/EntityResolver.html

For a more info see:

http://www.ibm.com/developerworks/library/x-tipent.html

Kindest regards,
Victor

_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...

Re: SAXBuilder dtd location

by polx :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Try giving a full-URL as input-source.
This doesn't prevent you to give a stream to the input-source as well  
so that at the end the URL is just a simulated one.

paul


Le 03-juil.-09 à 15:01, Bernd Müller a écrit :

> Hello,
>
> I try to build documents with the SAXBuilder with turned on  
> validation. I have a bunch of xml-documents that are spread through  
> various sub folders. Therefore, I want the SAXBuilder to look at a  
> given position for the dtd. How do I tell the SAXBuilder where to  
> find the dtd?
>
> Regards,
> Bernd
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/ 
> youraddr@...


_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...

smime.p7s (2K) Download Attachment