#!/usr/bin/perl use warnings; use strict; use XML::LibXML; my $parser = 'XML::LibXML'->new(); my $doc = $parser->parse_file('file.xml'); for my $title ($doc->findnodes('//gotoButton')) { my $button = $title->getAttribute('name'); my $display = $title->getAttribute('display'); my $caption = $title->findvalue('caption/@caption'); print "$button\t$display: $caption\n"; }
In reply to Re: Perl LibXML Help.
by choroba
in thread Perl LibXML Help.
by DunLidjun
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |