perlquestion
c
Okay, last [cpan://XML::Simple] question for a while, I promise.<br>
I am messing around with nested containers and I am not sure how to call a container that doesnt have a "key" assigned.<p>
<code>
<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>
</code>
<p>
With the above xml info, I wanted to do something like<p>
<code>
my $i = XMLin("filename",forcearray => 1);
print "$i->{snmp}->{version}\n";
</code><p>
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<p>
<code>
<snmp version="2c">
<retries>2</retries>
<community>public</community>
</snmp>
</code>
<p>
But I really prefer the nested approach. I'm not sure how to approach this one. Is what I am trying to do feasible?<p>
thanks -[c]