in reply to Re: XML::Twig Question
in thread XML::Twig Question
I have the following code to access Title element with Name => 'Advanced Perl Programming' !<Books> <Titles Mode="List"> <Title Name="Programming Perl"/> <Title Name="Advanced Perl Programming"/> <Title Name="Learning Perl on Win32 Systems"/> </Titles> </Books>
syntax error at Books.pl line 56, near "Title[" Global symbol "@Name" requires explicit package name at Books.pl line 56.my $filtername = 'Advanced Perl Programming'; my $books_tree= new XML::Twig(twig_roots => {Title[@Name= "$filtername +"] => 1}); $books_tree-> parsefile('books.xml'); $books_tree->set_att(Name => 'Advanced Perl');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: XML::Twig Question
by Tanktalus (Canon) on Aug 16, 2005 at 01:49 UTC | |
|
Re^3: XML::Twig Question
by bpphillips (Friar) on Aug 16, 2005 at 13:06 UTC | |
by ramya2005 (Scribe) on Aug 16, 2005 at 17:21 UTC | |
by ramya2005 (Scribe) on Aug 16, 2005 at 19:36 UTC | |
|
Re^3: XML::Twig Question
by GrandFather (Saint) on Aug 15, 2005 at 22:50 UTC | |
by ramya2005 (Scribe) on Aug 15, 2005 at 23:20 UTC | |
by GrandFather (Saint) on Aug 16, 2005 at 00:02 UTC | |
by Anonymous Monk on Aug 16, 2005 at 03:00 UTC |