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

1
2
3
4
5
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
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.