in reply to (jeffa) Re: An ampersand is not well-formed XML data?
in thread An ampersand is not well-formed XML data?

Ampersand needs to be encoded everywhere. Quote needs to be encoded within an quoted argument. Less-than and greater-than need to be encoded outside a quoted argument. It's not an error to encode all four everywhere, but it's overkill.

-- Randal L. Schwartz, Perl hacker

  • Comment on Re: (jeffa) Re: An ampersand is not well-formed XML data?

Replies are listed 'Best First'.
Re: Re: Re: An ampersand is not well-formed XML data?
by mirod (Canon) on May 01, 2001 at 12:01 UTC

    Actually greater-than does not need to be encoded at all. There is never any problem with it, as it only has a special meaning at the end of a tag, where regular character data cannot appear. <doc att=">">></doc> is a perfectly valid piece of XML.

    Michel V. Rodriguez, XML Hacker ;--)