in reply to Re^2: XML::Twig Question
in thread XML::Twig Question
Notice a couple of things I did differently:use strict; use XML::Twig; my $parser = new XML::Twig( twig_print_outside_roots => 1, twig_roots => { 'Title[@Name="Advanced Perl Programming"]' => sub { my ( $tree, $element ) = @_; $element->set_att( Name => 'Advanced Perl' ); $element->print; } } ); $parser->parse_file('books.xml');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: XML::Twig Question
by ramya2005 (Scribe) on Aug 16, 2005 at 17:21 UTC | |
|
Re^4: XML::Twig Question
by ramya2005 (Scribe) on Aug 16, 2005 at 19:36 UTC |