HTML tags in XML

Mark Wieder mwieder at
Tue Mar 21 14:10:59 EST 2006


Tuesday, March 21, 2006, 9:43:36 AM, you wrote:

> On Mar 21, 2006, at 9:34 AM, Mark Wieder wrote:

>> Trevor-
>> Tuesday, March 21, 2006, 8:12:11 AM, you wrote:
>>> 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".
>> I think urlEncode() will do the trick here.

> I don't think this will work in this case.  For example, urlEncod 
> ("<p>hi</p>") would give you:

> %3Cp%3Ehi%3C%2Fp%3E

> When what you really want is:

> <p>hi</p>

Yes and no. As long as you have the data stored properly encoded then
you should be able to decode it on the way out:

set the htmlText of field "grunt" to urlDecode(xmlData)

-Mark Wieder
 mwieder at

More information about the Use-livecode mailing list