CPAN is your friend.
One approach (there may be more than one) is to use XML::LibXML, with particular attention to XML::LibXML::Dtd to parse a DTD and XML::LibXML::Document to validate (particularly the is_valid and validate methods).
This took me just a few minutes to look up...
In reply to Re: Validating XML against a DTD
by herveus
in thread Validating XML against a DTD
by JediWizard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |