cat with_dtd.xml ]>
Hello world!
perl -MXML::Twig -e "$twig= new XML::Twig(LoadDTD=>1,DTDHandler=>sub{print qq(FOUND\n) if $_[1]});$twig->parsefile($ARGV[0])" with_dtd.xml #output.. FOUND cat withOUT_dtd.xmlHello world!
perl -MXML::Twig -e "my $twig= new XML::Twig(LoadDTD=>1,DTDHandler=>sub{print qq(FOUND\n) if $_[1]});$twig->parsefile($ARGV[0])" withOUT_dtd.xml #output..