This puts the text from all the "genre" nodes into an array.use XML::LibXML; #Parse XML my $template = 'xmldocument.xml'; my $parser = XML::LibXML->new(); my $doc = $parser->parse_file($template); #Find desired node(s) my @nodes= $doc->findnodes("//genre"); #Put results in array my @information; for(@nodes) { my $data = $_->textContent; push (@information,$data); }
In reply to Re: Perl XML
by ramrod
in thread Perl XML
by mecrazycoder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |