I know that XML Simple will read xml files but what if i have a .cfg or .txt file but in XML format? Can I read them using xml simple?
Thank you.
Edit: Thanks for the negative votes!!!!
use XML::Simple;
use Data::Dumper;
$file = "mytemp.txt";
my $config = XMLin("mytemp.txt");
print Dumper($config);
And this is what i got:
user ~]$ Extra content at the end of the document at /some path/SAX.pm line 64.
The error you're providing has nothing to do with filename extentions but malformed XML-content. – pavel Nov 11 '11 at 19:57