Re: XML in textarea problem

Lachlan Hunt <lhunt07@postoffice.csu.edu.au> wrote:

> You should also encode the > character as &gt; to be correct.

Not necessarily. '>' is not in itself is an out-of-band character in content
or attribute values. It is only special as part of the sequence ']]>'.

This acts as an ending for CDATA sections. For obscure and uninteresting
reasons, the sequence ']]>' should not be included in content; certainly,
escaping all >s to &gt;s is one way to avoid this.

> The four entities defined in xml (&lt; &gt; &amp; and &quot;) should always
> be used

There's another predefined entity, too, &apos;. Neither " nor ' have to be
written as entity references in normal usage; it's only in attributes
where one or the other has been used as a delimiter that this becomes
required.

-- 
Andrew Clover
mailto:and@doxdesk.com
http://www.doxdesk.com/

Received on Tuesday, 4 November 2003 09:08:47 UTC