Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 XmlTextWriter 类创建的 xml 回答 .ashx 文件中的 xmlhttprequest 我必须如何输出它?到文件/字符串/内存?
如果我正确理解您的问题,那么您想写信给Response.OutputStream. 您可以通过在实例化XmlTextWriter.
Response.OutputStream
XmlTextWriter
您可能还想清除和/或设置适当的响应标头。
最终你想把它写给客户,所以像
context.Response.OutputStream
将是一个合理的输出流写入。