Thread XML: Zahlen anhand von Keywords finden (19 answers)
Opened by cohama at 2013-03-28 13:16

pq
 2013-03-28 15:51
#166738 #166738
User since
2003-08-04
12204 articles
Admin1
[Homepage]
user image
na wenn wir fertigen code liefern:
Code (perl): (dl )
1
2
3
4
5
6
7
8
use XML::LibXML;
my $p = XML::LibXML->new;
my $doc = $p->parse_string($xml);
my $root = $doc->documentElement; 
my ($pp) = $root->findnodes("pp");
for my $field ( qw/ uid ppn ethAddr hwType /) {
    say $pp->getAttribute($field)
}
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread XML: Zahlen anhand von Keywords finden