Class: REXML::Document

Inherits:
Object show all
Defined in:
lib/webget_ramp/xml.rb

Instance Method Summary collapse

Instance Method Details

#remove_attributesObject

Remove all attributes from the document’s elements.

Return the document.

cf. Element#remove_attributes



161
162
163
164
# File 'lib/webget_ramp/xml.rb', line 161

def remove_attributes
  self.elements.each("//") { |e| e.attributes.each_attribute{|attribute| attribute.remove }}
  self
end