CDATA

Ken Ray kray at sonsothunder.com
Fri Jan 26 12:05:04 EST 2007


On Fri, 26 Jan 2007 00:13:53 -0700, Bridger Maxwell wrote:

> Hey,
>  Here I am on  the usergroup again needing even more help on XML.  I am
> trying to use CDATA to store HTML-formatted text inside a node, but I am not
> having much luck.  The text starts out looking like this:
> <p>Hey! 20857</p>
> <p>How are you?</p>
> 
> Then I wrap it in the CDATA tag:
> <![CDATA[ <p>Hey! 20857</p>
> <p>How are you?</p> ]]>
> 
> Then I store it in the XML.  It looks like this in the XML:
> <htmlText><![CDATA[ <p>Hey!</p
> <p>How are you?</p> ]]></htmlText>
> 
> Then upon retrieving it, I only get the first line.  

First of all, there should be no replacement of angle bracket 
characters with entities inside a CDATA node - that's the whole point 
of the node. Secondly, there is obviously a bug in the external.

If you want to, you could use my XML Library that handles this properly 
(I just tested), and since it's Transcript-only, you can use it in 
tandem with the revXML external if you like.

Here's the URL:

  http://www.sonsothunder.com/products/xmllib/xmllib.htm

HTH,

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/



More information about the use-livecode mailing list