On Jun 16, 2008, at 8:37 AM, Eric Lease Morgan wrote:
> What is the "best" way to do Perl-based XML validation?
Argg! This was too simple:
use XML::LibXML;
$dtd = XML::LibXML::Dtd->new( "SOME DTD" );
$xml = XML::LibXML->new->parse_file( "file.xml" );
if ( ! $xml->validate( $dtd )) { print 'XML is invalid.' }
RTFM.
--
Eric Morgan
University of Notre Dame
|