C
cate
I have a perl file that will read an XML file and search for the tag
<pop> (and read the entire tag) with this expression:
$/='<'.$ARGV[1].'>';
where pop has been passed in as the argument. I now have to do the
same with an XML file that is coming with with this format: <pop
loc="AA11"> or <pop loc="A24"> or <pop loc="AA1">. I have tried a
number of different combinations but I just can't seem to get this
right. After this one I gave up:
$/='<'.$ARGV[1].' loc="\w+">';
If anyone can assist me on this, I'd be very grateful.
Thanks,
Cate
<pop> (and read the entire tag) with this expression:
$/='<'.$ARGV[1].'>';
where pop has been passed in as the argument. I now have to do the
same with an XML file that is coming with with this format: <pop
loc="AA11"> or <pop loc="A24"> or <pop loc="AA1">. I have tried a
number of different combinations but I just can't seem to get this
right. After this one I gave up:
$/='<'.$ARGV[1].' loc="\w+">';
If anyone can assist me on this, I'd be very grateful.
Thanks,
Cate