in reply to Re^3: XML::Twig Question
in thread XML::Twig Question

I am specifying 'attribute_condition' as it is specified in the XML::Twig document.
tag[@att="val"]
?? Is my understanding about the usage is wrong?

Replies are listed 'Best First'.
Re^5: XML::Twig Question
by GrandFather (Saint) on Aug 16, 2005 at 00:02 UTC

    I can't make a lot of sense of the documentation either. However the following code may help:

    use warnings; use strict; use XML::Twig; my $filtername = 'Advanced Perl Programming'; my $books_tree= new XML::Twig(twig_roots => {Title => \&FixName}); $books_tree->parse(join "", <DATA>); #$books_tree->set_att(Name => 'Advanced Perl'); sub FixName { my ($p1, $p2) = @_; my %node = %$p2; print $node{"att"}{"Name"}."\n"; }

    Perl is Huffman encoded by design.
Re^5: XML::Twig Question
by Anonymous Monk on Aug 16, 2005 at 03:00 UTC