delete_namespace

delete_namespace(namespace="xmlns")
Instance Public methods

Removes a namespace from this node. This only works if the namespace is actually declared in this node. If no argument is passed, deletes the default namespace.

Evaluates to: this element

doc = Document.new "<a xmlns:foo='bar' xmlns='twiddle'/>"
doc.root.delete_namespace
puts doc     # -> <a xmlns:foo='bar'/>
doc.root.delete_namespace 'foo'
puts doc     # -> <a/>
doc_ruby_on_rails
2015-05-06 10:24:45
Comments
Leave a Comment

Please login to continue.