HTML tags in XML

Stephen Barncard stephenREVOLUTION at barncard.com
Tue Mar 21 17:07:45 EST 2006


See if URLEncode() and URLDecode() will package and recover your text 
and/or htmltext to XML's liking...it works for me on other stuff...

sqb

>On Mar 21, 2006, at 7:43 AM, Devin Asay wrote:
>
>>Hi Folks,
>>
>>Is it possible to store html styled text in an xml document and 
>>then successfully retrieve the text with html markup intact?
>>...
>>
>><comments>
>>Here are my comments.
>>Some of the text is colored <font color="#FF0000">red</font> & 
>><font color="#0000FF">blue</font>
>></comments>
>>...
>>
>>Is there a way to do this? Will I have to resort to saving the 
>>RTFtext in the xml node or something like that?
>
>Hi Devin,
>
>You need to escape ", ', <, and < when entering data into an XML 
>node.  I can't remember if RevXML has any handlers for this or if 
>you just have to do it by hand.  For an example of the escape 
>characters just do a Google search for "xml escape characters".
>
>You may want to check out Ken Ray's XML library.  I haven't used it 
>but browsing through the API, there is a stsXML_replaceEntities that 
>looks like it would do what you want.
>
>--
>Trevor DeVore
>Blue Mango Learning Systems - http://www.bluemangolearning.com
>trevor at bluemangolearning.com

-- 
stephen barncard
s a n  f r a n c i s c o
- - -  - - - - - - - - -



More information about the Use-livecode mailing list