Ruby REXML::Attributes Functions
EditRocket provides the following information on REXML::Attributes functions in the Ruby source code builder.
add( attribute ) - Adds an attribute, overriding any existing attribute by the same name. Namespaces are significant.
delete( attribute ) - Removes an attribute
delete_all( name ) - Deletes all attributes matching a name. Namespaces are significant.
each() - Itterates over each attribute of an Element, yielding the expanded name and value as a pair of Strings.
each_attribute( {|attribute| ...} - Itterates over the attributes of an Element. Yields actual Attribute nodes, not String values.
get_attribute( name ) - Fetches an attribute
get_attribute_ns(namespace, name) - The get_attribute_ns method retrieves a method by its namespace and name. Thus it is possible to reliably identify an attribute even if an XML processor has changed the prefix.
length() - Returns the number of attributes the owning Element contains.
namespaces() -
new(element) - Constructor
prefixes() - "Returns an array of Strings containing all of the prefixes declared by this set of # attributes. The array does not include the default namespace declaration, if one exists."
size() - "Alias for #length"
to_a() -