Synonym for Element.to_a This is a little slower than calling elements.each directly.
Returns the next sibling that is an element, or nil if there is no Element sibling after this one
doc = Document.new '<a><b/>text<c/></a>' doc.root.elements['b'].next_element #-> <c/> doc.root.elements['c'].next_element #-> nil
Removes an attribute
either an Attribute or a String. In either case, the attribute is found by matching the attribute name to the argument, and then removed. If no attribute is found, no action is taken.
the attribute removed, or nil if this Element did not contain a matching attribute
e = Element.new('E') e.add_attribute( 'name', 'Sean' ) #-> <E name='Sean'/> r = e.add_attribute( 'sur:name', 'Russell' ) #-> <E name='Sean' sur:name='Russell'/> e.delete_attribute( 'name' ) #-> <E sur:name='Russell'/> e.delete_attribute( r ) #-> <E/>
Removes multiple elements. Filters for Element children, regardless of XPath matching.
all elements matching this String path are removed.
doc = Document.new '<a><c/><c/><c/><c/></a>' deleted = doc.elements.delete_all 'a/c' #-> [<c/>, <c/>, <c/>, <c/>]
Deletes all attributes matching a name. Namespaces are significant.
A String; all attributes that match this path will be removed
an Array of the Attributes that were removed
Creates a Rinda::Tuple for ary.
Removes dead tuples.
Set @@default_parser to new_value if it is one of the available parsers. Else raise NotValidXMLParser error.
return the tag_names for setters associated with uri
Override to display the default values of the command options. (similar to arguments, but displays the default values).
For example:
def defaults_str --no-gems-first --no-all end