Reputation: 11
Can any body help me out on how to validate and parse the 500MB file using perl.
I had try the libxml module but it only validates upto 400MB. and i also tried with XML::SAX::ParserFactory
, which is giving me the Bus Error (core dumped).
I am very thankful on ur answers.
Upvotes: 1
Views: 178
Reputation: 16171
You can also use XML::Twig which is designed for this. It will be slower than XML::LibXML::Reader, but you may find it more convenient.
Upvotes: 2
Reputation: 241968
I would use a more modern pull parser: XML::LibXML::Reader.
use XML::LibXML::Reader;
my $reader = XML::LibXML::Reader->new(location => "file.xml")
or die "cannot read file.xml\n";
while ($reader->read) {
processNode($reader);
}
sub processNode {
...
}
Upvotes: 4