Help for this page

Select Code to Download


  1. or download this
    <prefix:monastery xmlns:prefix="http://perlmonks.org">
      <prefix:foo>
    ...
        </prefix2:bar>
      </prefix:foo>
    </prefix>
    
  2. or download this
    my $trigger = "prefix:monastery/prefix:foo/prefix2:bar/prefix2:monk";
    my $twig = XML::Twig->new(TwigHandlers => { $trigger => \&function });
    
  3. or download this
    my $trigger = "*:monastery/*:foo/*:bar/*:monk";
    my $twig = XML::Twig->new(TwigHandlers => { $trigger => \&function });
    
  4. or download this
    my $xml_ns = {
    "http://perlmonks.org" => prefix,
    ...
      map_xmlns => $xml_ns,
      TwigHandlers => { $trigger => \&function }
    );
    
  5. or download this
    use XML::Twig;
    use strict;
    ...
    XML
    
    $twig->parse($xml);
    
  6. or download this
    
    use XML::Twig;
    ...
    XML
    
    $twig->parse($xml);