in reply to XML::Checker

Just to point out an alternative. I presume you want to use XML::Checker to validate the XML against a DTD and not just see if the XML itself is valid. If that's the case, XML::LibXML is a fine alternative. I use it in production code to validate XML against DTDs.

my $parser = XML::LibXML->new; $parser->validation(1); eval { $doc = $parser->parse_string($xml); }; if ($@) { # XML not well formed, error handling here... } eval { $doc->validate; }; if ($@) { # XML did not pass DTD validation, error handling here... }
-- vek --

Replies are listed 'Best First'.
Re: Re: XML::Checker
by aroso (Novice) on Jul 25, 2003 at 11:19 UTC
    Yes I use the XML::Checker to validate the XML against a DTD.
    I dont need to see if th XML is valid.
    But i need to catch the content of some tags of the XML file. But i dont know how can i do it.
    Can you help me?
    Thanks...