I am getting a strange(?!) issue, while parsing and xml file using XML::LibXML.
Below is my code :
my $parser_obj = XML::LibXML->new();
my $xml_file = "filename.xml";
$doc = $parser_obj->parse_file($xml_file);
my ($xml_node) = $doc->findnodes($xpath);
The error lies in line 3 , where I get the error as ,"Execution Failed: Could not create file parser context for file "filename.xml" No error at line 3 <filename.pm>
I am getting this error when I do this operation for a repeated number of times, and also the file is always existent in the specified location. The worst part is , I could not figure out, when this error occurs. Some times, it occurs in 6th iteration, sometimes in 100th iteration. Does it has anything to do with the file access issues by XML::LibXML ?