class Fixnum
Enhance the Fixnum class with a XML escaped character conversion.
#####################################################################
def xchr(escape=true)
the CP1252 fix is still applied but utf-8 characters are not
XML escaped version of chr. When escape is set to false
def xchr(escape=true) n = XChar::CP1252[self] || self case n when *XChar::VALID XChar::PREDEFINED[n] or (n<128 ? n.chr : (escape ? "&##{n};" : [n].pack('U*'))) else Builder::XChar::REPLACEMENT_CHAR end end