On Fri, 16 Dec 2005, Patrick Gundlach wrote:

> Hi,
>
>> is there know way to do this
>>
>>    require "rexml/document"
>>
>>    include REXML
>>
>>    Text::new " i < know & what i'm doing "
>>
>> it seems not...
>
> I am not sure, what you want to do, but perhaps
>
> Text.unnormalize(" i < know & what i'm doing ") is the answer?
>
> REXML won't let this into the element hierarchy, afaik.

it will - you just have to trick it:

   element.text =
     ::REXML::Text::new(
       string_we_want_untouched,
       respect_whitespace=true,
       parent=nil,
       raw=true,
       entity_filter=nil,
       illegal=%r/.^/m           # match nothing!
     )

sean, if you're reading this a feature in the api to allow this would be great.

cheers.

-a
-- 
===============================================================================
| ara [dot] t [dot] howard [at] noaa [dot] gov
| all happiness comes from the desire for others to be happy.  all misery
| comes from the desire for oneself to be happy.
| -- bodhicaryavatara
===============================================================================