hello
if you please,
my perl program is;
use XML::Simple;
use Data::Dumper;
#create object
$xml = new XML::Simple;
#read XML file
$data = $xml->XMLin("server.xml");
#access XML data
print Dumper($data);
exit;
and "sever.xml" contains
<config>
<server name="sahara" osname="solaris" osversion="2.6">
<address>10.0.0.101</address>
<address>10.0.1.101</address>
</server>
<server name="gobi" osname="irix" osversion="6.5">
<address>10.0.0.102</address>
</server>
<server name="kalahari" osname="linux" osversion="2.0.34">
<address>10.0.0.103</address>
<address>10.0.1.103</address>
</server>
</config>
the program as is runs great. no problem...
question:
instead of using the DUMPER, how can i access ONE field of one element
inside perl? for example, if i want to know what is the address for server
'gobi', how to i get to it??
thank you so much in advance1
mario sanchez
fiu
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs