Do you have a question? Post it now! No Registration Necessary. Now with pictures!
June 3, 2008, 9:57 am
rate this thread
So I am a little new to XML::Parser but I have read the docs and PODs
and know that this module has what I need but I am a little stuck on
I have this XML:
<?xml version='1.0' encoding='UTF-8'?>
<list name="Nialls list">
and I have this perl script:
$parser = new XML::Parser( Style => 'Tree' );
my $tree = $parser->parsefile( 'testxml.xml' );
print Dumper( $tree );
which prints the contents of the xml to the screen. However what I
really want to do is Parse through the file taking out each firstname
and putting them in an array. At the very least I would quite like to
just know how to 'get at' to a node.
The $tree - is it an array? a scalar? a variable? little confused
there you see. If it is a scalar, how do I get access to it?
Thanks in advance
- » Error calling Win32::Printer from a perl script hosted in IIS on Win2k3
- — Next thread in » PERL Modules Announcements