c#(更具体地说是xna)我如何通过http请求xml文件? 不需要支持xbox

发布于 2024-07-07 19:57:04 字数 267 浏览 5 评论 0原文

我正在 XNA 中开发一款游戏,我需要它来从我们的网站获取服务器列表。

所以我只需要向 http://play.feedthezombie.com 发送一个 http 请求/?want=servers&enc=xml 并将比赛作为字符串或 xml 对象获取。

有什么线索吗?

So im working on a game in XNA and i need it to get a server list off our site.

so i just need to do a http request to http://play.feedthezombie.com/?want=servers&enc=xml
and get the contest as either a string or xml object.

any clues?

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

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

发布评论

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

评论(2

凉城已无爱 2024-07-14 19:57:04

使用 XmlDocument.Load 方法。 它可以从 URL 加载 XML。

Use XmlDocument.Load method. It can load XML from an URL.

音栖息无 2024-07-14 19:57:04

您可以在 Windows 上调用您喜欢的任何 .NET 框架类,包括执行网络访问和 XML 处理的类。 在 Xbox 上,您只能使用 XNA 提供的内容,它是 .NET 框架的子集,并且唯一的网络访问是通过 Xbox Live API 进行的。

You can call any .NET framework classes you like on Windows, including ones that do network access and XML handling. On Xbox you are limited to what XNA provides to you which is a subset of the .NET framework and the only network access is through the Xbox Live APIs.

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