ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
Re: XML::Simple - how to iterate through records?
by Eric Bohlman other posts by this author
Jul 10 2001 10:35PM messages near this date
view in the new Beta List Site
Re: Compiling XML::LibXML on SCO | PerlSax to parse/search large (~350 MB) file
7/10/01 4:14:46 PM, Phil Brodd <philip-brodd@[...].edu>  wrote:

> I've been playing with XML::Simple, which seems quite nice.  What I don't
> understand is how to refer to the entire array that is the value of the
> 'request' key below, or how to iterate through its elements.
> 
> I am able to reference individual elements of the array with
> $hashref->{request}->[index], but how do I refer to the whole thing?

foreach my $record (@{$hashref-> {request}}) {
  # process the record
}

See perlref, perllol, and perldsc for information about dereferencing hashes and arrays buri
ed in 
nested data structures.


_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
http://listserv.ActiveState.com/mailman/listinfo/perl-xml

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved