【发布时间】:2011-03-21 06:31:09
【问题描述】:
对于 iPhone 应用程序,我从服务器中提取数据作为 xml。我想反序列化 xml 并将数据放入自定义对象中,而无需解析整个 xml
例如:- 如果我的 xml 是这样的
<book title="The Hitchhiker's Guide to the Galaxy" price="15.49">
<description>
Join Douglas Adams's hapless hero Arthur Dent as he travels the galaxy with his intrepid pal Ford Prefect, getting into horrible messes and generally wreaking hilarious havoc.
</description>
</book>
<book title="The Restaurant at the End of the Universe " price="14.36">
<description>
Arthur and Ford, having survived the destruction of Earth by surreptitiously hitching a ride on a Vogon constructor ship, have been kicked off that ship by its commander. Now they find themselves aboard a stolen Improbability Drive ship commanded by Beeblebrox, ex-president of the Imperial Galactic Government and full-time thief.
</description>
</book>
我创建了一个对象“作者”,我想以 Author.Book、Author.Book.Description 的身份访问数据。 有没有人这样做过? 提前致谢
【问题讨论】:
标签: iphone xml ios4 xml-parsing xml-deserialization