Have a look at
http://www.wutka.com/dtdparser.html
"juppie" <juppieNO-> wrote in message
news:bhl08n$du2$...
> Hello,
>
> I'm writing visual XML editor. At the moment I need a DTD parser which
> will parse DTD (either standalone or internal to XML doc) and give me an
> access to underlying DTD in convenient manner. What I need especially is
> API that will answer to questions:
>
> - what elements are defined in DTD
> - what elements can be inserted before/after particular element
>
> I took a while to make some research and found that older versions
> (3.0.1 and below?) of IBM XML4j had very nice class
> 'com.ibm.xml.parser.DTD' which provided excactly what I need (through
> *getAppendableElements* and *getInsertableElements* methods.
>
> However, that class has been removed from future versions of XML4j and I
> can't find any link to older releases.
>
> Can anyone give me some hint where can I find DTD parser wich will
> fulfill my needs? Maybe someone has older XML4j version mentioned above,
> and can share it with me?
>
> Any help would be greatly appreciated.
>
> best regards,
> Bernard
>