Hi All,
This is a query regarding using the XML:

imple parser...
I am trying to parse an autogenerated XML using this parser and figure out the array size of a node...
if anybody can tell me how to find the array size...
my XML has following node:
<URL>
<Server>www</Server>
<Domain>google.com</Domain>
</URL>
<URL>
<Server>www</Server>
<Domain>erp.com</Domain>
</URL>
my code:
========================================================================
my $obj = new XML:

imple;
my $ref = $obj->XMLin($fh);
print Dumper($ref);
$server = $ref->{URL}->[$i]->{Server};
========================================================================
thing is I can reference the elements as $server = $ref->{URL}->[0]->{Server}; $server = $ref->{URL}->[1]->{Server};
but sometimes the XML has only single element in node as:
<URL>
<Server>www</Server>
<Domain>amittest.com</Domain>
</URL>
in this case I might not find an array...then question becomes how do I assign it in variables...
thx in adv...