Parsing DTDs

I’m a Tamino newbie and I need to write an application which presents a fill-in form to users to insert datas. I guess I should use a DTD parser which analyzes the selected DTD from a list of the available DTDs and understands the structure of the document to build the form…
I know Breeze XML Studio can build java classes from DTDs but I’d actually like something more dynamic which can parse the DTD on the fly…
Anybody out there can give me any hints?
Thanks,
Paolo