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.
Yep. XML::Simple doesn’t care about the file extension, only the content.
You can always just test it out yourself quickly: