Leser: 20
1 2 3 4
$perl -w -MXML::XPath -MData::Dumper -e '$xp=XML::XPath->new(filename =>"$ARGV[0]"); $t=$xp->getNodeText(q(/a/b/c)); my %h; $h{"a"}=$t; print Dumper $t; print "\n>$t<\n"' a.xml $VAR1 = bless( do{\(my $o = '1755269100')}, 'XML::XPath::Literal' ); >1755269100<
QuoteReturns the text string for a particular XML node. Returns a string, or undef if the node doesn't exist.
Quotevalue()
Also overloaded as stringification, simply returns the literal string value.