如何连接 iPhone 和 Web 服务并获取 XML 数据? [英] How can I connect iPhone and web service and get XML data?

查看:18
本文介绍了如何连接 iPhone 和 Web 服务并获取 XML 数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何使用 iPhone 连接到网络服务器,但现在我必须将 iPhone 连接到网络服务.我不知道怎么做,也没有在线演示或课程.

I know how to connect to web server using an iPhone but now I have to connect the iPhone to a web service. I don't know how to do it and there is no demo or class available online.

有人有什么想法吗?

推荐答案

你可能会找到这个教程,叫做 Intro to SOAP Web 服务 很有用.他展示了如何打包请求、将其发送到 Web 服务并读取响应.

You might find this tutorial, called Intro to SOAP Web Services useful. He shows how to package a request, send it to a web service, and read the response.

如果您需要一些 XML 解析方面的帮助,可以使用 TouchXML 库这将为您提供一个不错的 xml文档".请注意内存使用情况.

If you need some help with XML parsing, there is the TouchXML library which will give you a nice xml "document" to work with. Just be cautious of memory usage.

如果您必须解析大型 XML 消息,请使用 Cocoa 中关于 libxml 和 xmlreader 的教程 将向您展示如何使用较低级别的事件样式解析器解析 XML.

If you have to parse large XML message this tutorial about libxml and xmlreader in Cocoa will show you how to parse XML with the lower-level event-style parsers.

这篇关于如何连接 iPhone 和 Web 服务并获取 XML 数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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