获取XML的根节点名称
private static Regex regex = new Regex("<(\\w+?)[ >]", RegexOptions.Compiled); private string GetRootElement(string body) { Match match = regex.Match(body); if (match.Success) { return match.Groups[1].ToString(); } else { throw new TopException("Invalid XML response format!"); } }