[转载]XML非法字符的处理
https://blog.csdn.net/qq_36330228/article/details/84779390
static void Main(string[] args)
{
string str = "Canon \"LCIXUS3< Soft>her\x00 Car\x08r'y Case\x0b Su&its IX\x1e10\x0cIS>";
string result = Regex.Replace(str, @"[\x00-\x08\x0B\x0C\x0E-\x1F]", "");
result = result.Replace("&", "&");
result = result.Replace("'", "'");
result = result.Replace("\"", """);
result = result.Replace(">", ">");
result = result.Replace("<", "<");
Console.WriteLine(result);
Console.ReadKey();
}