diff options
Diffstat (limited to 'lib/rexml/attribute.rb')
-rw-r--r-- | lib/rexml/attribute.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/rexml/attribute.rb b/lib/rexml/attribute.rb index e99927943f..803d0217b1 100644 --- a/lib/rexml/attribute.rb +++ b/lib/rexml/attribute.rb @@ -80,8 +80,11 @@ module REXML # 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 |