CDATA is not a possibility for now, but I did find something online, that I can use.
You can clean up your XML using a function like this.
PHP Code:public static string XmlCharacterWhitelist(string inString)
{
if (inString == null) return null;
var sbOutput = new StringBuilder();
foreach (var ch in inString)
{
if ((ch >= 0x0020 && ch <= 0xD7FF) ||
(ch >= 0xE000 && ch <= 0xFFFD) ||
ch == 0x0009 ||
ch == 0x000A ||
ch == 0x000D)
{
sbOutput.Append(ch);
}
}
return sbOutput.ToString();
}




Reply With Quote