Here's a function I've used in parsing the content of xml documents:

function xmlEntities pXmlContent
   replace """ with quote in pXmlContent
   replace "'" with "'" in pXmlContent
   replace "&lt;" with "<" in pXmlContent
   replace "&gt;" with ">" in pXmlContent
   replace "&amp;" with "&" in pXmlContent
   return pXmlContent
end xmlEntities

According to wikipedia (http://en.wikipedia.org/wiki/ List_of_XML_and_HTML_character_entity_references)
there are only these 5 to deal with. For html there are 252!

Best,

Mark

On 8 Nov 2008, at 22:30, william humphrey wrote:

I'm generating my own XML without using the XML functions of RunRev (it's faster and I can format exactly how I want it to look). But I would like a function for cleaning the text for "&" to &amp; and that kind of thing. Any suggestions for such a function? There must be one in RunRev that the
XML library uses.

Thanks,  Bill
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to