Hi everyone,
I'm parsing a huge number of XML files and have run into a problem. Most of the files have this at the start:
<EARTHSTATS>
But the odd file has this:
<?xml version="1.0" encoding="utf-8"?>
<EARTHSTATS xmlns="http://www.earthstats.org/XFDL/Custom">
and it's messing up my parse. I'm sure there is a way of grepping through the files from the command line and getting rid of the offenders but I'm useless at that. Can anyone start me off with the type of command to use?
Thanks!
Update:
This is what's messing me up:
my @nodes = $doc->findnodes('EARTHSTATS');
It doesn't work on the file that has the xmlns - maybe I could change that?