package My::Taglib; use strict; use warnings; use base qw(XML::Filter::Foo); # name of filter yet to be decided. sub new { my $class = shift; my $self = bless ({}, $class); $self->register_ns(qw(http://www.iordy.com/ns/node)); $self->register_tags(qw(node hello)); } sub tag_node { # gets access to all children may do some processing based on them # and then add in below foo } sub tag_hello { # replaces with world } 1; __DATA__ foo