2011-05-06 111 views
0

当我解析以下我有一些错误。 Verse didEndEelement没有字符串值.. 我需要在一个可变数组中的章节..请帮助我。如何解析XML?

<book name="Genesis"> 
    <chapter number="1"> Name of the chapter </chapter> 
    <chapter number="1"> Name of the chapter </chapter> 
    <chapter number="1"> Name of the chapter </chapter> 
    </book> 

    <book name="Genesis"> 
    <chapter number="1"> Name of the chapter </chapter> 
    <chapter number="1"> Name of the chapter </chapter> 
    <chapter number="1"> Name of the chapter </chapter> 
    </book> 

回答

0

请参阅开发人员中心的topsongs苹果示例或在Google上查找有关如何使用nsxml解析器解析xml的示例。你也可以在谷歌上使用一些不同的xml解析器搜索。你一定会找到一个