in reply to Re: Convert XML To Perl Data Structures Using XML::Twig
in thread Convert XML To Perl Data Structures Using XML::Twig
Will now need to look like:my $twig = XML::Twig->new(); while (<$fh>) { $twig->parse($_); # ... }
I have no idea the extent of the performance overhead but it is probably less than the alternative:while (<$fh>) { my $twig = XML::Twig->new($data_struct); $twig->parse($_); # ... }
I am not saying it is a bad idea - it just doesn't feel clean to me.my $twig = XML::Twig->new($data_struct); while (<$fh>) { $twig->parse($_); # ... my $copy = deep_copy($data_struct); $data_struct = clear_structure($data_struct); }
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Convert XML To Perl Data Structures Using XML::Twig
by anonymized user 468275 (Curate) on May 24, 2011 at 16:29 UTC |