Re: XML Parser misbehaves with &

From: Date: Tue, 19 Aug 2003 12:24:11 +0000
Subject: Re: XML Parser misbehaves with &
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-160005@lists.php.net to get a copy of this message
Timo Boettcher wrote:
Hi Jeff, Nachricht vom Montag, 18. August 2003, 18:14:37:
I've come across this frustrating behavior with the XML parser when it reads an escaped ampersand (&amp;) If the xml being evaluated is: <COLORS>Blue, Green &amp; Red</COLORS>
"The ampersand character (&) and the left angle bracket (<) may appear in their literal form only when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. If they are needed elsewhere, they must be escaped using either numeric character references or the strings "&amp;" and "&lt;" respectively." HTH Timo Which seems to have been done by Nachricht. As mentioned before it's perfectly normal for sax parsers to fire too events for the same text block. The expat parser is well known for this behaviour.
-- Raditha Dissanayake ------------------------------------------------------------- http://www.radinks.com/sftp/ Lean and mean Secure FTP applet with Graphical User Inteface. just 150 Kilo Bytes

« previous php.general (#160005) next »