use strict; # Don't leave out! use warnings; # Don't leave out! use XML::LibXML; my $parser = XML::LibXML->new(); my $doc = $parser->parse_fh(\*DATA); my @product = $doc->getElementsByTagName('product'); for my $kid ( @product ){ print join("\t", $kid->getElementsByTagName('name')->[0]->textContent, $kid->getElementsByTagName('imageURL_med')->[0]->textContent, $kid->getAttribute('category_id'), $kid->getAttribute('id'), $kid->getElementsByTagName('desc_short')->[0]->textContent, ), "\n"; } # print $doc->serialize(); __END__ Children's Hand Rake Mini gardeners can dig, rake and scoop out their own plot with this children's hand rake, complete with contoured handles and durable metal heads. Bag of Broken Glass http://moocow.co.uk.jp/something/something/bg.jpg Fun for all ages!