# File lib/xml/dom/core.rb, line 2182 def normalize return if @children.nil? old = nil children = @children.to_a.dup children.each do |child| if !old.nil? && old.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE old.appendData(child.nodeValue) self.removeChild(child) else if child.nodeType == ELEMENT_NODE child.normalize end old = child end end end