What do you want to do with the DTD?
- if you want to check documents against it, then you can use XML::Checker or XML::LibXML (set validation on by using $parser->validation(1);),
- if you need info about the DTD then good ole XML::Parser allows you to set handlers on the various events in the DTD,
- then if what you need is to get the default attributes or to expand entities in the XML, I usually do this as a separate process, using a standalone tool. xmllint which comes with libxml2 should do this, I use osx as my data is originally in SGML.