Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Perl XML::Twig (very Simple Example)

DZone's Guide to

Perl XML::Twig (very Simple Example)

·
Free Resource
Using XML::Twig


use XML::Twig;

my $xml = '
  

  
  
   
    
      This is 
    
some HTML text
'; my $twig = XML::Twig->new( twig_handlers => { content => sub { $_->print; print "\n"; }, }, ); $twig->parse($xml); $twig->purge;
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}