采用了正则表达是的方法’
var reg = new Regex(@"<(?<tag>.*?)>(?<content>(.*[<>].*)+)</\k<tag>>");
xmlStr = reg.Replace(xmlStr, m =>
{
return $"<{m.Groups["tag"].Value}><![CDATA[{m.Groups["content"].Value}]]></{m.Groups["tag"].Value}>";
});