如何在C#中使用POST,PUT和PATCH动词解析xml请求 [英] how to parse xml request while using POST, PUT and PATCH Verbs in C#

查看:112
本文介绍了如何在C#中使用POST,PUT和PATCH动词解析xml请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我用Json解析请求并阅读响应。现在,我已经要求将XMl解析为请求并从响应中读取xml数据。我已经为Json使用了Newtonsoft.Json命名空间。



可以请一些人分享我用于XMl的类似命名空间和一些示例代码来传递和检索XML数据



谢谢

Hi,

I've used Json to parsing the request and reading the response. Now, I've asked to parse XMl as request and read xml data from the response. I've used Newtonsoft.Json namespace for Json.

Can some one please share me similar namespace used for XMl and some sample code to passing and retrieving XML data

Thanks

推荐答案

你有不同的选择,在MSDN中有一些很好的例子,你可以看看。



LINQ(XDocument): XDocument类 [ ^ ]



XmlDocument类 [ ^ ]
You have different options and there are some good examples in MSDN you can have a look at.

LINQ (XDocument): XDocument Class[^]

XmlDocument Class[^]


这篇关于如何在C#中使用POST,PUT和PATCH动词解析xml请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆