BioHazard has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use XML::Twig; my $t = XML::Twig->new( twig_handlers => { child => \&onChild } ); $t->parse('<node id="17"><content>foo bar</content><child file="19.xml +" /></node>'); sub onChild { my ($t, $child) = @_; my $atts = $child->atts; $t->parsefile($atts->{file}); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Recursion and XML::Twig
by tlm (Prior) on Aug 25, 2005 at 11:10 UTC | |
by BioHazard (Pilgrim) on Aug 25, 2005 at 12:05 UTC | |
|
Re: Recursion and XML::Twig
by mirod (Canon) on Aug 25, 2005 at 13:36 UTC | |
|
Re: Recursion and XML::Twig
by mirod (Canon) on Aug 25, 2005 at 15:06 UTC |