简体   繁体   English

iPhone应用程序XML阅读

[英]Iphone app XML reading

I'm making an iphone app in xcode that has to be able to read xml retrieved from the web. 我正在用xcode开发一个iPhone应用程序,该应用程序必须能够读取从Web检索到的xml。 It works with every xml ive tried except this one. 它可与除此以外的所有xml ive一起使用。 What's wrong with it? 它出什么问题了?

<appMetrics versionName="1.1.0" startDate="2013-04-16" metric="ActiveUsersByDay" groupBy="dayOfYear" endDate="2013-04-18" country="US" version="1.0" generatedDate="4/19/13 10:10 AM">
<day value="6" date="2013-04-16"/>
<day value="4" date="2013-04-17"/>
<day value="2" date="2013-04-18"/>
</appMetrics>

The problem was that when I entered the URL in a browser, it would give me a XML, but when in xcode it would give me a JSON. 问题是,当我在浏览器中输入URL时,它会给我一个XML,但是在xcode中时,它会给我一个JSON。 I just had to request it in XML format. 我只需要以XML格式请求它。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM