Using Rexle::text::unescape

require 'rexle'

xml = "<root><abc><fun>45&6</fun></abc></root>"
doc = Rexle.new xml
doc.root.element('abc').text.unescape

#=> "<fun>45&6</fun>"

To unescape embedded XML within a Rexle document use theRexle::text's unescape method.

Tags:
Source:
1605hrs.txt
Published:
08-06-2014 16:05