Skip to content

Instantly share code, notes, and snippets.

@toolbear
Created June 9, 2011 18:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
decoding XML inside <content>{encoded XML}</content>
# usage:
# perl xml-decode.pl FILE
use XML::LibXML;
binmode STDOUT;
my $parser = XML::LibXML->new();
my $doc = $parser->parse_file($ARGV[0]);
my $content = $doc->documentElement();
print $content->textContent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment