StringBuilder sbuf = new StringBuilder(); XmlTextWriter writer = new XmlTextWriter(new StringWriter(sbuf)); xslt.Transform(xdoc, null, writer); writer.Close();
利用StringBuilder对象和StringWriter对象即可。
sbuf.ToString()可得到XML的字符串表示
没有评论:
发表评论