XPath::NodeSet



XPath::NodeSet

NAME
DESCRIPTION
SYNOPSIS
API

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−>get_nodelist) {
                my $newresults = $xp−>find('./other/element', $context);
                ...
        }

API

new()
You will almost never have to create a new NodeSet object, as it is all done for you by XPath.

get_nodelist()
Returns a list of nodes. See XML::XPath::XMLParser for the format of the nodes.

string_value()
Returns the string-value of the first node in the list. See the XPath specification for what "string-value" means.

to_literal()
Returns the concatenation of all the string-values of all the nodes in the list.

get_node($pos)
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.

push(@nodes)
Equivalent to perl’s push function.

append($nodeset)
Given a nodeset, appends the list of nodes in $nodeset to the end of the current list.

shift()
Equivalent to perl’s shift function.

unshift(@nodes)
Equivalent to perl’s unshift function.

prepend($nodeset)
Given a nodeset, prepends the list of nodes in $nodeset to the front of the current list.



More Linux Commands

manpages/wattrset.3ncurses.html
wattrset(3ncurses) - curses character and window attribute c
These routines manipulate the current attributes of the named window. The current attributes of a window apply to all characters that are written into the windo

manpages/Tk_DeleteAllBindings.3.html
Tk_DeleteAllBindings(3) - invoke scripts in response to X ev
These procedures provide a general-purpose mechanism for creating and invoking bindings. Bindings are organized in terms of binding tables. A binding table cons

manpages/attr_get.3.html
attr_get(3) - get the value of a user attribute of a filesys
The attr_get and attr_getf functions provide a way to retrieve the value of an attribute. Path points to a path name for a filesystem object, and fd refers to t

manpages/clamd.conf.5.html
clamd.conf(5) - Configuration file for Clam AntiVirus Daemon
clamd.conf configures the Clam AntiVirus daemon, clamd(8). FILE FORMAT The file consists of comments and options with arguments. Each line which starts with a h

manpages/gjavah.1.html
gjavah(1) - - generate header files from Java class files...
The gjavah program is used to generate header files from class files. It can generate both CNI and JNI header files, as well as stub implementation files which

manpages/git-fast-export.1.html
git-fast-export(1) - Git data exporter - Linux manual page
This program dumps the given revisions in a form suitable to be piped into git fast-import. You can use it as a human-readable bundle replacement (see git-bundl

manpages/sethostid.2.html
sethostid(2) - get or set the unique identifier of the curre
gethostid() and sethostid() respectively get or set a unique 32-bit identifier for the current machine. The 32-bit identifier is intended to be unique among all

manpages/add_members.8.html
add_members(8) - Add members to a list from the command line
Add members from a file to a mailman list. Listname is the name of the Mailman list you are adding members to. It must already exist. OPTIONS -n file, --non-dig

manpages/curl_global_init.3.html
curl_global_init(3) - Global libcurl initialisation.........
This function sets up the program environment that libcurl needs. Think of it as an extension of the library loader. This function must be called at least once

manpages/Tk_GetAnchor.3.html
Tk_GetAnchor(3) - translate between strings and anchor posit
Tk_GetAnchorFromObj places in *anchorPtr an anchor position (enumerated type Tk_Anchor) corresponding to objPtrs value. The result will be one of TK_ANCHOR_N, T

manpages/SDL_WM_SetIcon.3.html
SDL_WM_SetIcon(3) - Sets the icon for the display window....
Sets the icon for the display window. Win32 icons must be 32x32. This function must be called before the first call to SDL_SetVideoMode. It takes an icon surfac

manpages/ttyname_r.3.html
ttyname_r(3) - return name of a terminal - Linux man page...
The function ttyname() returns a pointer to the null-terminated pathname of the terminal device that is open on the file descriptor fd, or NULL on error (for ex





We can't live, work or learn in freedom unless the software we use is free.