use XML::Twig; my $xml = '<?xml version="1.0" ?> <page id="1"> <content> This is <div class="red">some HTML text</div> </content> </page>'; my $twig = XML::Twig->new( twig_handlers => { content => sub { $_->print; print "\n"; }, }, ); $twig->parse($xml); $twig->purge;
In reply to Re^2: Parse with XML::Simple: how to keep some tags "unparsed"?
by qq
in thread Parse with XML::Simple: how to keep some tags "unparsed"?
by dda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |