Hi Igor, 

you could use the DTD-Parser from Mark Wutka (http://www.wutka.com). This
will give you complete access to the whole DTD. Just try it. 

But take care, there are some problems concerning external parameter
entities (at least in version 1.13.). If you need such complicated DTDs you
could use SAX to resolve the external entities for you and afterwards pass
the dtd to Wutkas parser:

You need to implement the DeclHandler and LexicalHander interfaces of SAX
(that's easy) to build up a StringBuffer with all the Definitions in the DTD
read from the parser. Then you build up a StringReader and pass it to the
DTDParser object. That's it. You'll receive a DTD object with calling
parse() on the DTDParser object.

Sorry, but I have no access to my sources right now. If you want me to post
this code just let me know and give me one or two days :).

hope that helps 

Harald


-----Urspr�ngliche Nachricht-----
Von: Igor PARTL [mailto:[EMAIL PROTECTED]
Gesendet am: Freitag, 9. November 2001 16:01
An: Xerces-J-User
Betreff: Working with DTD

Hi!


I've no suggestion, where I could begin. Perhaps someone can give me a
point to start (better: parts of code):

I want to read an dtd.
Then I want to build a xml-file.

Now I've been searching for a method, that give me the possible
elements at one point in the xml-file.

Example:
<!ELEMENT a (b|c)*>
...

<xml>
 <a>
  <b/>
  POINT ...-> The answer is: Possible elements are 'b' or 'c'.
 </a>
</xml>


Igor PARTL


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

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

Reply via email to