Query: xml::xpath::nodeset
OS: suse
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
XPath::NodeSet(3) User Contributed Perl Documentation XPath::NodeSet(3)NAMEXML::XPath::NodeSet - a list of XML document nodesDESCRIPTIONAn XML::XPath::NodeSet object contains an ordered list of nodes. The nodes each take the same format as described in XML::XPath::XMLParser.SYNOPSISmy $results = $xp->find('//someelement'); if (!$results->isa('XML::XPath::NodeSet')) { print "Found $results "; exit; } foreach my $context ($results->get_nodelist) { my $newresults = $xp->find('./other/element', $context); ... }APInew() 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. perl v5.12.1 2002-09-02 XPath::NodeSet(3)
Related Man Pages |
---|
xml::xpath::nodeset5.18(3) - mojave |
xml::xpath::nodeset(3) - suse |
xml::libxml::nodelist(3) - osx |
xml::xpath::nodeset5.16(3) - osx |
xml::libxml::nodelist(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
i-nodes |
optimizing - to find the number of occurrence |
shift and push question in perl |
another perl question |
Shuffling 'cards' using perl. |