Prevent REXML from doing any character decoding

How can I ask REXML to NOT DO any sort of character decoding or
encoding when it processes XML files?
My files include all sorts of encoding, which is unfortunately not
recognized by REXML. I just want to process it so that all characters
are maintained exactly as they are.

For example, Unicode HTML encoded characters (like  ) should just
stay this sequence, and not transformed into Â.

It it possible?
Can I do this without adding a character encoding line to the XML
files?

Thanks,
Helzer

http://www.germane-software.com/software/rexml/docs/tutorial.html :

There is a programmatic solution: :raw. If you set the :raw flag on
any Text or Element node, the entities within that node will not be
processed. This means that you'll have to deal with entities yourself:

Entity Replacement

doc = Document.new('<!DOCTYPE
        foo [ <!ENTITY ent "replace"> ]><a>replace
        &ent;</a>',{:raw=>:all})
        doc.root.text #-> "replace &ent;" doc.to_s # Generates: #
        <!DOCTYPE foo [ # <!ENTITY ent "replace"> #
        ]><a>replace &ent;</a>

···

On 9/21/07, helzer <amir.helzer@gmail.com> wrote:

How can I ask REXML to NOT DO any sort of character decoding or
encoding when it processes XML files?
My files include all sorts of encoding, which is unfortunately not
recognized by REXML. I just want to process it so that all characters
are maintained exactly as they are.

For example, Unicode HTML encoded characters (like &#160:wink: should just
stay this sequence, and not transformed into Â.

It it possible?
Can I do this without adding a character encoding line to the XML
files?

Thanks,
Helzer