bpaulsen has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/bin/perl5 -w use XML::Twig; my $twig = new XML::Twig( TwigRoots => { "LINK" => 1 } ); $twig->parse( "<?xml version=\"1.0\"?><TEST><LINK><TITLE>This < is +a > "test' & don't you forget it</TITLE></LINK> +</TEST>" ); my $root = $twig->root; my @links = $root->children; print $links[0]->first_child_text( "TITLE" ), "\n"; Results: This < is a > "test' & don't you forget it
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Unescape characters from XML::Twig
by mirod (Canon) on Apr 20, 2001 at 20:03 UTC | |
by nardo (Friar) on Apr 20, 2001 at 21:24 UTC | |
Re: Unescape characters from XML::Twig
by arturo (Vicar) on Apr 20, 2001 at 19:39 UTC |