Class LibXML::XML::Node::Set
In: ext/libxml/ruby_xml_node.c
lib/libxml/node_set.rb
Parent: Object

Includes Enumerable.

Methods

[]   each   empty?   first   length   size   to_a   xpath   xpath_ctxt  

Included Modules

Enumerable Enumerable

Public Instance methods

inefficient, but maybe can find a way to cache the ary and dump on change?

[Source]

    # 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.

[Source]

/*
 * 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).

[Source]

/*
 * 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.

[Source]

/*
 * 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.

[Source]

/*
 * 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.

[Source]

/*
 * 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.

[Source]

/*
 * 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.

[Source]

/*
 * call-seq:
 *    nodeset.xpath -> xpath
 * 
 * Obtain the xpath corresponding to this nodeset, if any.
 */
VALUE
ruby_xml_node_set_xpath_get(VALUE self) {

Return the xpath context corresponding to this nodeset, if any.

[Source]

/*
 * call-seq:
 *    nodeset.xpath_ctxt -> context
 * 
 * Return the xpath context corresponding to this nodeset,
 * if any.
 */
VALUE
ruby_xml_node_set_xpath_data_get(VALUE self) {

[Validate]