Wednesday, 8 January 2014

Extracting particular content from xml using perl script

open("FILE","test1.xml");
while($line=<FILE>)
{
@s=split(" ",$line);
foreach $i (@s)
{
if($i=~/\bCT=|\bSN=|\bChType=|\bNI=|\bOAmt=|\bDAmt=/)
{
print $i.";";
}
}
print "\n";
}

No comments:

Post a Comment