Project

General

Profile

Bug #8685 ยป rexml-attribute-namespace.patch

ohai (Ippei Obayashi), 07/26/2013 01:35 AM

View differences:

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
    (1-1/1)