如何使用 XML 和 HTTP 与 Google 通讯录交互?
I am trying to understand this document.
But I am not getting how to implement it in my previous code which I did according to this link .
Can anyone provide me sample code to proceed with.
I am not getting how to use these XML entries.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在“之前的代码”中使用的 C# 库是一个包装器Google Contacts API 协议,这是您想要理解的文档。更准确地说,它是一个包装器
Google 通讯录提供的 Google Data API。
该协议实际上是 REST 调用,它会返回 ATOM 和/或 JSON 提要。您可以使用 WebRequest 和 WebResponse 在 C# 中实现此功能,并使用 XMLReader 之类的工具解析结果,但如果已经有一个库可以为您执行此操作,为什么还要这样做呢?
The C# library you're using in your 'previous code' is a wrapper around the Google Contacts API protocol, which is the document you're trying to understand. To be more precise, it's a wrapper around
the Google Data API which Google Contacts provides.
The protocol are actually REST calls which return you ATOM and/or JSON feeds. You could implement this in C# using WebRequest and WebResponse and parse the result with something like XMLReader, but why would you do that if there's already a library which does that for you?