1XML::LibXML::NodeList(3U)ser Contributed Perl DocumentatiXoMnL::LibXML::NodeList(3)
2
3
4

NAME

6       XML::LibXML::NodeList - a list of XML document nodes
7

DESCRIPTION

9       An XML::LibXML::NodeList object contains an ordered list of nodes, as
10       detailed by the W3C DOM documentation of Node Lists.
11

SYNOPSIS

13         my $results = $dom->findnodes('//somepath');
14         foreach my $context ($results->get_nodelist) {
15           my $newresults = $context->findnodes('./other/element');
16           ...
17         }
18

API

20   new()
21       You will almost never have to create a new NodeSet object, as it is all
22       done for you by XPath.
23
24   get_nodelist()
25       Returns a list of nodes, the contents of the node list, as a perl list.
26
27   string_value()
28       Returns the string-value of the first node in the list.  See the XPath
29       specification for what "string-value" means.
30
31   to_literal()
32       Returns the concatenation of all the string-values of all the nodes in
33       the list.
34
35   get_node($pos)
36       Returns the node at $pos. The node position in XPath is based at 1, not
37       0.
38
39   size()
40       Returns the number of nodes in the NodeSet.
41
42   pop()
43       Equivalent to perl's pop function.
44
45   push(@nodes)
46       Equivalent to perl's push function.
47
48   append($nodelist)
49       Given a nodelist, appends the list of nodes in $nodelist to the end of
50       the current list.
51
52   shift()
53       Equivalent to perl's shift function.
54
55   unshift(@nodes)
56       Equivalent to perl's unshift function.
57
58   prepend($nodeset)
59       Given a nodelist, prepends the list of nodes in $nodelist to the front
60       of the current list.
61
62   iterator()
63       Will return a new nodelist iterator for the current nodelist. A
64       nodelist iterator is usefull if more complex nodelist processing is
65       needed.
66
67
68
69perl v5.12.0                      2009-09-23          XML::LibXML::NodeList(3)
Impressum