On 8/30/07, Rob Hunter <> wrote:
> I'm trying to avoid having
>
> <textarea id="foo"></textarea>
>
> turn into
>
> <textarea />
>
> But this is exactly what happens to me in both XmlSimple and REXML:
<empty/> and <empty></empty> are equivalent in the XML spec, so this
is correct behavior.
> Does anyone know of a way to avoid this in either library? Or, should I
> be doing this another way?
If you're using REXML, you might investigate the last argument to write():
http://www.ruby-doc.org/stdlib/libdo...t.html#M002971
ie_hack: Internet Explorer is the worst piece of crap to have ever
been written, with the possible exception of Windows itself. Since IE
is unable to parse proper XML, we have to provide a hack to generate
XML that IE's limited abilities can handle. This hack inserts a space
before the /> on empty tags. Defaults to false
HTH,
Keith