class Attribute

Includes NodeNamespace
Defines an Element Attribute; IE, a attribute=value pair, as in: <element attribute="value"/>. Attributes can be in their own namespaces. General users of REXML will not interact with the Attribute class much.

Attributes

Methods


Attributes

element (reader)
value (accessor)

Methods

==

Arguments

other
Returns true if other is an Attribute and has the same name and value, false otherwise.

clone


element=

Arguments

element
Returns this attribute
Sets the element of which this object is an attribute

hash


Creates (and returns) a hash from both the name and value

initialize

Arguments

first
if an Attribute, clones the attribute. If a String, uses this as the attribute name. If a Source, parses the source for key=value pairs.
second<nil>
(optional) if first is an Attribute or a Source, this can be the Element to which the Attribute belongs. If first is a String, this is the value part of the attribute.
parent<nil>
(optional) if first is a String, this can be the parent to which this attribute belongs

Constructor.

namespace

Arguments

arg<nil>

prefix


remove


Removes this Attribute from the tree, and returns true if successfull

to_s


write

Arguments

output
indent<0>

Writes this attribute (EG, puts 'key="value"' to the output)