We ignore the source attribute because during parsing entity reference
substitution may cause us to lose the ability to know what the original XML
Returns text with all entities replaced.
Write XML to io. Use the "<<" method, not print or puts,
because io might be a String or Array and not an IO object.
Return the text string reversed. We replace all '<' with '<' so
that the result is still legal in an XML document.
Instead of returning the text with entities substituted, return the
original source if we have it.
Return the text string, or nil if the text is empty or is all whitespace.