Hai
 I have an XML file which i need to parse with the XSD file but it is not
happening..if i do the same file with the PHP it is giving correct results..
so does any one know hw to do it..

This is the code i am using.

use XML::SAX::ParserFactory;
use XML::Validator::Schema;

$validator = XML::Validator::Schema->new(file => 'mets.xsd');
$parser = XML::SAX::ParserFactory->parser(Handler => $validator);
eval { $parser->parse_uri('hnp_1370R1_20100258-output.xml') };
die "File failed validation: $@" if $@;


Regards
Chaitanya

Reply via email to