From: Julian Fitzell Date: 2001-11-16T04:40:56+09:00 Subject: [ruby-talk:25325] Re: ANN: REXML 1.1a3 On 16/11/2001 at 4:14 AM Sean Russell wrote: >Ben Schumacher wrote: >The source document must be well formed. If an '&', '<', or '>' are >encountered in the source document, an error is (should be) reported. >However: > > element.text = "cats & dogs" > >is valid; REXML will auto-convert '&' to '&' on output. With the >never >versions (1.1a+, I believe), it also correctly processes text such as: > > element.text = "cats & dogs" > >When you write out the element, '&' will be converted, and the entity will >be ignored. Hmm... what if I want to actually include the text d ? I admit it's not very common unless you are talking about XML itself... but again this requires the user to know something about the encoding, otherwise they may be surprised when that part is not encoded... I wonder if it would be better to use a different method if you want text not to be escaped? I'm not sure myself so I'm just throwing the idea out there. Julian