special characters in XML

HI!
I am creating an XML file. Is there a servoy utility that encodes special characters before I place them in my XML(e.g.D!@#$%^&*()_+) because when I read back the XML it causes an exception.

The entity name must immediately follow the '&' in the entity reference.

You could use a CDATA block in your XML-file, like this:

martinh:
You could use a CDATA block in your XML-file, like this:

Thanks Martin,

I did try to use CDATA. However, I read that my CDATA cannot contain the string “]]>”.
http://www.w3schools.com/xml/xml_cdata.asp
And so I used javascript escape().

Anyone who knows any limitations of using escape() function?