c has asked for the wisdom of the Perl Monks concerning the following question:
<global> <snmp> <version>2c</version> <community>public</community> <retries>2</retries> </snmp> <node id="10.6.21.1"/> <node id="10.6.21.2"/> </global>
With the above xml info, I wanted to do something like
my $i = XMLin("filename",forcearray => 1); print "$i->{snmp}->{version}\n";
This doesn't work, and actually causes the processor to spiral upward until the process is killed. I am sure that I could do something like
<snmp version="2c"> <retries>2</retries> <community>public</community> </snmp>
But I really prefer the nested approach. I'm not sure how to approach this one. Is what I am trying to do feasible?
thanks -c
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Calling nested containers with XML::Simple
by Kanji (Parson) on Jul 05, 2002 at 06:56 UTC | |
by c (Hermit) on Jul 05, 2002 at 07:06 UTC | |
by jeffa (Bishop) on Jul 05, 2002 at 15:51 UTC | |
|
Re: Calling nested containers with XML::Simple
by BrowserUk (Patriarch) on Jul 05, 2002 at 08:30 UTC |