C#输出xmlNodeList到控制台
public static string ToHTML(XmlNodeList xmlNodeList) { StringWriter stringWriter = new StringWriter(); XmlTextWriter xmlTextWriter = new XmlTextWriter(stringWriter); xmlTextWriter.Formatting = Formatting.Indented; foreach(XmlNode xmlNode in xmlNodeList) { xmlNode.WriteTo(xmlTextWriter); } return stringWriter.ToString(); }