module MultiXml::Parsers::Rexml

def merge_texts!(hash, element)

XML element whose texts are to me merged into the hash
element::
Hash to add the converted element to.
hash::

Merge all the texts of an element into the hash
def merge_texts!(hash, element)
  if element.has_text?
    # must use value to prevent double-escaping
    texts = element.texts.map(&:value).join
    merge!(hash, MultiXml::CONTENT_ROOT, texts)
  else
    hash
  end
end