正则表达式替换标签
str = System.Text.RegularExpressions.Regex.Replace(str, " <(?!(/?table)|(/?tr)|(/?td))[^ <>]*?>", "", RegexOptions.IgnoreCase);
str = System.Text.RegularExpressions.Regex.Replace(str, @" <(\w+)\s*[^ <>]*?>", " <$1>", RegexOptions.IgnoreCase);
str = System.Text.RegularExpressions.Regex.Replace(str, " ", "", RegexOptions.IgnoreCase);
System.Xml.XmlDocument dom = new System.Xml.XmlDocument();
dom.LoadXml(str);
System.Xml.XmlNodeList nl = dom.SelectNodes("//tr");
for (int i = 0; i < nl.Count; i++)
{
}
str = System.Text.RegularExpressions.Regex.Replace(str, @" <(\w+)\s*[^ <>]*?>", " <$1>", RegexOptions.IgnoreCase);
str = System.Text.RegularExpressions.Regex.Replace(str, " ", "", RegexOptions.IgnoreCase);
System.Xml.XmlDocument dom = new System.Xml.XmlDocument();
dom.LoadXml(str);
System.Xml.XmlNodeList nl = dom.SelectNodes("//tr");
for (int i = 0; i < nl.Count; i++)
{
}