public String stripNonValidXMLCharacters(String in) { StringBuilder out = new StringBuilder(); char current; if (in == null || ("".equals(in))) return ""; for (int i = 0; i < in.length(); i++) { current = in[i]; if ((current == 0x9) || (current == 0xA) || (current == 0xD) || ((current >= 0x20) && (current <= 0xD7FF)) || ((current >= 0xE000) && (current <= 0xFFFD)) || ((current >= 0x10000) && (current <= 0x10FFFF))) out.append(current); } return out.toString(); }
System.Security.SecurityElement.Escape()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)