Class | LibXML::XML::Node::Set |
In: |
ext/libxml/ruby_xml_node.c
lib/libxml/node_set.rb |
Parent: | Object |
inefficient, but maybe can find a way to cache the ary and dump on change?
# File lib/libxml/node_set.rb, line 13 13: def [](i, count = nil) 14: if count 15: to_a[i,count] 16: else 17: to_a[i] 18: end 19: end
Call the supplied block for each node in this set.
/* * call-seq: * nodeset.each { |node| ... } -> self * * Call the supplied block for each node in this set. */ VALUE ruby_xml_node_set_each(VALUE self) {
Determine whether this nodeset is empty (contains no nodes).
/* * call-seq: * nodeset.empty? -> (true|false) * * Determine whether this nodeset is empty (contains no nodes). */ VALUE ruby_xml_node_set_empty_q(VALUE self) {
Returns the first node in this node set, or nil if none exist.
/* * call-seq: * nodeset.first -> node * * Returns the first node in this node set, or nil if none exist. */ VALUE ruby_xml_node_set_first(VALUE self) {
Obtain the length of this nodeset.
/* * call-seq: * nodeset.length -> num * * Obtain the length of this nodeset. */ VALUE ruby_xml_node_set_length(VALUE self) {
Obtain the length of this nodeset.
/* * call-seq: * nodeset.length -> num * * Obtain the length of this nodeset. */ VALUE ruby_xml_node_set_length(VALUE self) {
Obtain an array of the nodes in this set.
/* * call-seq: * nodeset.to_a -> [node, ..., node] * * Obtain an array of the nodes in this set. */ VALUE ruby_xml_node_set_to_a(VALUE self) {
Obtain the xpath corresponding to this nodeset, if any.
/* * call-seq: * nodeset.xpath -> xpath * * Obtain the xpath corresponding to this nodeset, if any. */ VALUE ruby_xml_node_set_xpath_get(VALUE self) {