Help for this page

Select Code to Download


  1. or download this
    my $t= XML::Twig->new( elt_class => 'my_elt_class',
                           p => sub { $_->cut         # an XML::Twig::Elt 
    +method
                                        ->my_process; # a my_elt_class met
    +hod
    ...
      { my $elt= shift;
        # stuff here
      }
    
  2. or download this
      # in XML::Twig, every time it needs to create an element
      $self->{elt_class} || 'XML::Twig::Elt';
      my $element=  $elt_class->new;
    
  3. or download this
    #!/usr/bin/perl -w
    use strict;
    
    ...
    package my_elt3;
    
    BEGIN { @my_elt3::ISA= qw(XML::Twig::Elt); }