gaurav_b has asked for the wisdom of the Perl Monks concerning the following question:
I wonder if u might be able to help me with my query I'm validating a file having namespace from one xsd file and I want to extend it to a XML that has namespaces from multiple xsd files
How to do it??
The code I'm using for validation is ::::
Regards, Gauravuse XML::SAX::ParserFactory; use XML::Validator::Schema; print "Enter the address of the XML file: "; chomp($xml=<STDIN>); print "Enter the address of the Schema file: "; chomp($xsd=<STDIN>); # create a new validator object, using foo.xsd $validator = XML::Validator::Schema->new(file => $xsd); # create a SAX parser and assign the validator as a Handler $parser = XML::SAX::ParserFactory->parser(Handler => $validator); # validate xml against xsd eval { $parser->parse_uri($xml) }; if ($@) { print $@; }
2004-12-03 Janitored by Arunbear - added code tags, as per Monastery guidelines
|
|---|