method

prefix

v1_8_6_287 - Show latest stable - Class: REXML::Attribute
prefix()
public

Returns the namespace of the attribute.

 e = Element.new( "elns:myelement" )
 e.add_attribute( "nsa:a", "aval" )
 e.add_attribute( "b", "bval" )
 e.attributes.get_attribute( "a" ).prefix   # -> "nsa"
 e.attributes.get_attribute( "b" ).prefix   # -> "elns"
 a = Attribute.new( "x", "y" )
 a.prefix                                   # -> ""