Manual Pages for UNIX Darwin command on man XML::XPath::NodeSet
MyWebUniversity

Manual Pages for UNIX Darwin command on man XML::XPath::NodeSet

XPath::NodeSet(3) User Contributed Perl Documentation XPath::NodeSet(3)

NAME

XML::XPath::NodeSet - a list of XML document nodes

DESCRIPTION

An XML::XPath::NodeSet object contains an ordered list of nodes. The

nodes each take the same format as described in XML::XPath::XMLParser.

SYNOPSIS

my $results = $xp->find('//someelement');

if (!$results->isa('XML::XPath::NodeSet')) {

print "Found $results\n";

exit; }

foreach my $context ($results->getnodelist) {

my $newresults = $xp->find('./other/element', $context);

... } AAPPII new() You will almost never have to create a new NodeSet object, as it is all done for you by XPath. getnodelist() Returns a list of nodes. See XML::XPath::XMLParser for the format of the nodes. stringvalue()

Returns the string-value of the first node in the list. See the XPath

specification for what "string-value" means.

toliteral()

Returns the concatenation of all the string-values of all the nodes in

the list.

ggeettnnooddee(($$ppooss))

Returns the node at $pos. The node position in XPath is based at 1, not

0. size() Returns the number of nodes in the NodeSet. pop() Equivalent to perl's pop function. ppuusshh((@@nnooddeess)) Equivalent to perl's push function.

aappppeenndd(($$nnooddeesseett))

Given a nodeset, appends the list of nodes in $nodeset to the end of

the current list. shift() Equivalent to perl's shift function. uunnsshhiifftt((@@nnooddeess)) Equivalent to perl's unshift function.

pprreeppeenndd(($$nnooddeesseett))

Given a nodeset, prepends the list of nodes in $nodeset to the front of

the current list.

perl v5.8.8 2002-09-02 XPath::NodeSet(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™