2011-05-06 112 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解析器搜索。你一定會找到一個