A class that holds the Attributes of an Element.
Fetches an attribute value. If you want to get the Attribute itself, use get_attribute() @param name an XPath attribute name @return A String, which is the
value of the first matching attribute, or nil if there was none
Fetches an attribute @param name the XPath by
which to search for the attribute @return The first matching Attribute, or nil if there was none
Sets an attribute, overwriting any existing attribute value by the same
name @param name the name of the attribute @param value (optional) If
supplied, the value of the attribute. If nil, any existing matching
attribute is deleted. @return self NOTE that unlike most REXML methods, this does not return the set Attribute.
Removes an attribute @return the removed attribute
Adds an attribute, overriding any existing attribute by the same name.
@param attribute must be an Attribute
DO NOT USE THIS METHOD! It WILL fail, and may be removed. If you absolutely
need this method, write the author. Deletes all attributes matching an
xpath @param xpath A String; all attributes that match this path will be
removed @return an Array of the Attributes
that were removed
|