Re: [xml] CDATA parsing issue



Prashant R wrote:
<icecream><![CDATA[Ben's&Jerry's >>"Mango"<<]]></icecream>

which after parsing is extracted as
Ben's&Jerry's >>"Mango"<<

i would want it as
Ben's&amp;Jerry's&gt;&gt;"Mango"&lt;&lt;

Why would you want that?  What you have is the actual content.

I think youâll find that if you re-serialize that correctly in any
context that requires XML escaping, youâll get it; this is far
preferable to corrupting the data on parsing.

~Chris
-- 
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
âAll I ask of living is to have no chains on me,
 And all I ask of dying is to go naturally.â â Laura Nyro
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]