# File lib/xml/dom2/element.rb, line 335
      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