Bug #8685 ยป rexml-attribute-namespace.patch
| lib/rexml/attribute.rb | ||
|---|---|---|
|
# Returns the namespace URL, if defined, or nil otherwise
|
||
|
#
|
||
|
# e = Element.new("el")
|
||
|
# e.add_attributes({"xmlns:ns", "http://url"})
|
||
|
# e.namespace( "ns" ) # -> "http://url"
|
||
|
# e.add_namespace("ns", "http://url")
|
||
|
# e.add_attribute("ns:a", "b")
|
||
|
# e.add_attribute("nsx:a", "c")
|
||
|
# e.attribute("ns:a").namespace # => "http://url"
|
||
|
# e.attribute("nsx:a").namespace # => nil
|
||
|
def namespace arg=nil
|
||
|
arg = prefix if arg.nil?
|
||
|
@element.namespace arg
|
||