Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi to all, I'm wondering if it's possible to use dynamic paths to element in xml document. Now I'm using XML::Simple and I want to do something like this:
use XML::Simple; my $fh = IO::File->new('/root/regions.xml'); my $data = XML::Simple::XMLin($fh); $data->{root}->{configs}->$VAR->{region_prefix}
Or is there some other way, or workaround that will not require to rewrite whole script for for this?
Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl XML "dynamic paths "?
by daxim (Curate) on Aug 16, 2012 at 14:03 UTC | |
by kazak (Beadle) on Aug 23, 2012 at 08:58 UTC | |
|
Re: Perl XML "dynamic paths "?
by Corion (Patriarch) on Aug 16, 2012 at 13:54 UTC | |
by kazak (Beadle) on Aug 16, 2012 at 15:12 UTC | |
by Corion (Patriarch) on Aug 16, 2012 at 16:50 UTC | |
by kazak (Beadle) on Aug 23, 2012 at 08:57 UTC |