Please see code below. I am using XML::Simple to unravel an XML File. My end purpose to this is to extract all data out of the XML file and import the data into a database.
My question: Is there a simple way to tell how many records I actually have in the XML file. I want to create a 'for' loop but I don't know how many iterations to give it.
I'm sure there is a simple solution here I am not seeing. Thanks!
use XML::Simple qw(:strict);
# $rsp contains the XML that I retrieve using a cURL call to an external source.
my $xs = XML::Simple->new(ForceArray => 1, KeepRoot => 1, KeyAttr=>);
my $config = $xs->XMLin($rsp);
## SO what I want to do here is create a loop using and index to loop
# Through all possible entries in my XML data. The line below prints out
# correctly the first 'Entry' in 'Entries' of Field 16.