简体   繁体   English

如何从XML而不是JSON的网址获得响应?

[英]How can I get a response from a url in XML instead of JSON?

I am trying to access a website using C# and HttpWebRequest. 我正在尝试使用C#和HttpWebRequest访问网站。 I can get the response from the website but the response is in JSON. 我可以从网站获得响应,但是响应是JSON。 Is there any way to get the response in XML instead of JSON so I can use XmlDocument to parse through the information? 有什么方法可以获取XML而不是JSON的响应,因此我可以使用XmlDocument来解析信息? I was asked to use XML instead of JSON... 我被要求使用XML而不是JSON ...

Any help is appreciated! 任何帮助表示赞赏! :) :)

No.what kind of response format all depends on the website. 否。哪种响应格式都取决于网站。 you just can follow the response format to make your logic 您可以按照响应格式来制定逻辑

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用LINQ to XML将所有子节点值与XML Response分开? - How can i get all subnode values separately from XML Response using LINQ to XML? 如何从Ajax jQuery而不是json获取XML - How to get XML from Ajax jQuery Instead of json IIS 8.5 覆盖自定义 JSON 错误响应,而是返回默认的 500 错误响应页面。 如何让 IIS 8.5 返回我的自定义错误? - IIS 8.5 overriding custom JSON error response, instead returns the default 500 error response page. How can I get IIS 8.5 to return my custom error? 如何从 C# 中的 FormRecognizer 文档中获取 JSON 响应? - How can I get the JSON response from a FormRecognizer document in C#? 我怎样才能从XML获得这种价值? - How can I get this vaue from XML? 从XML转换后,如何在JSON中获取不带引号的数字值 - How can I get numeric values without quotes in JSON after converting from XML 如何从 url 中检索 http 响应状态代码? - How can i retrieve the http response status code from an url? 如何从 URL 获取 Json 对象,Windows Phone 8.1 (C#) - How can I get my Json object from URL, Windows Phone 8.1 (C#) 如何从url获取参数 - How can I get the parameters from url 如何从数据库获取json类型的响应? - How do i get a json-type response from database?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM