用于回答 xmlhttprequest 的 XmlTextWriter 的格式

发布于 2024-11-07 04:27:51 字数 88 浏览 7 评论 0原文

为了回答 .ashx 文件中的 xmlhttprequest,其中包含使用 XmlTextWriter 类创建的 xml,我必须如何输出它?到文件/字符串/内存?

for answer a xmlhttprequest in .ashx file with xml that created with XmlTextWriter class how I must Outputting it ? to a file/string/memory ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

水溶 2024-11-14 04:27:51

如果我正确理解你的问题,那么你想写入Response.OutputStream。您可以通过在实例化 XmlTextWriter 时提供流作为参数来实现此目的。

您可能还想清除和/或设置适当的响应标头。

If I understand your question correctly, then you want to write to Response.OutputStream. You can do this by providing the stream as parameter when instantiating the XmlTextWriter.

You may want to clear and/or set appropriate response headers, too.

北风几吹夏 2024-11-14 04:27:51

最终您希望将其写入客户端,因此类似的内容

context.Response.OutputStream

将是一个合理的写入输出流。

Ultimately you want to be writing it to the client, so something like

context.Response.OutputStream

would be a reasonable output stream to write to.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文