http://www.perlmonks.org?node_id=1095137


in reply to Re^2: XML::Twig how to find a parent's attribute
in thread XML::Twig how to find a parent's attribute

sub li { my ($t,$elt) = @_; my $e = $elt->parent('[@conref != ""]'); # p removed if ( defined $e ){ print $e->tag." ".$elt->text."\n"; } }
poj