xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Miller <hmil...@eti.com>
Subject Re: How do I parse a DTD in Java?
Date Tue, 13 Jan 2004 19:26:29 GMT
Absolutely!  I'm using it already. It might be a little tricky, I had 
to do a lot of trial and error to figure out the pieces I wanted 
(there's not much in the way of Docs about using Xerces in this way), 
but the point is it *can* be done. I was able to pull out <!ELEMENT > 
declarations and their attributes, etc. and write output files based 
on this data.

I forget the name, but there's a good sample program in the Xerces-J 
directory to get you started.

Depending on what you want to do, it might be more than you need. All 
solutions offered up so far have been very good ones -- I just 
noticed that this one wasn't offered.

At 8:12 PM +0100 1/13/04, Paul Libbrecht wrote:
>On 13-Jan-04, at 19:00 Uhr, Henry Miller wrote:
>>Preparsing grammars deals explicitly with reading a DTD (or XSD) 
>>and storing the data in a grammar which you can walk through to get 
>>the DTD pieces you're interested.
>Last time I read this, it wasn't working for DTDs (i.e. you could 
>pre-parser them but you couldn't inspect them). Can DTDs be 
>inspected by Xerces now ?



To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

View raw message