RE: [PHP] HTMLEntities as NUMERIC for XML

From: Date: Tue, 25 Nov 2008 17:32:51 +0000
Subject: RE: [PHP] HTMLEntities as NUMERIC for XML
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-283810@lists.php.net to get a copy of this message
> -----Original Message----- > From: ceo@l-i-e.com [mailto:ceo@l-i-e.com] > Sent: Tuesday, November 25, 2008 11:28 AM > To: php-general@lists.php.net > Subject: Re: [PHP] HTMLEntities as NUMERIC for XML > > > > I came across a similar problem using an AJAX thing, with MSWord > > characters in the text. The way round the problem was to enclose > > everything inside CDATA blocks, which made the browsers happy to > > receive as the entities only had to be understood by the HTML browser > > now, not the XML parser. As RSS is an XML format, maybe this would > help > > you? > > I suspect not. > > The RSS+XML standard[1] seems to be quite finicky, and wrapping in > CDATA block, from what I've read, will simply make some > readers/aggregators decide to not carry the RSS feed at all. > > I have no idea if "some" means "a handful" or "most" however. > > But trying to maximize audience, I'm being conservative and using KISS > principle until I know more. > > [1] > Actually, it's 9 different incompatible standards, with no two > published RSS standards being compatible: > http://diveintomark.org/archives/2004/02/04/incompatible-rss > I personally found this blog post "brilliant" > YMMV You are correct. Some feed readers will just throw everything in a <![CDATA[]]> block away. It can be useful when you are the only one reading/manipulating the XML ... but getting it into a "universal" code page is the way to go if aggregators are going to be touching your content. My 2c, // Todd

« previous php.general (#283810) next »