remove xml declaration from xml Data using perl or awk

Rapidfire25

New Member
Our application is at the receiving-end to do retro-analysis of XML data. Our application doesn't have Java or .NET available, but runs in Unix, so it has awk and Perl.The XML messages in the file contains:\[code\]<?xml version="1.0" encoding="ISO-8859-1" ?> \[/code\]I tried a few options in Perl and awk to get them removed, but couldn't get these to work:\[code\]perl -p -i -e "s/<?xml version="1.0" encoding="ISO-8859-1" ?>//g" inputFileperl -p -i -e "s/<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>//g" inputFileperl -p -i -e "s/<\?xml version="1.0" encoding="ISO-8859-1" \?>//g" inputFile\[/code\]Any other option to do this using PERL or AWK?
 
Back
Top