#!/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
In reply to Unescape characters from XML::Twig by bpaulsen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |