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.

http://xml.apache.org/xerces2-j/faq-grammars.html#faq-3

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 ?


Thanks.

Paul


--



--Henry



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to