Because you don't need to escape the closing ">" to make it valid XML.

The ampersand's evil. And replacing all "<" means you take care of any potential embedded tags.

libxml seems to parse > as &gt; automatically, but rejects any naked < as the start of an element name.

Roger

Reply via email to