-1

I am quite new to xml parse by iPhone..

please help me how can i get all image string of all deals. please see xml:

< DealXml>

< DealId>254 < /DealId>

< Image>

< string> http//offchi.com/Content/Images/Deals/634720181245941250634662123899446563prp01.jpg < /string>

< string> http//offchi.com/Content/Images/Deals/634720181245941250634662123899446563prp02.jpg < /string>

< string> http//offchi.com/Content/Images/Deals/634720181245941250634662123899446563prp03.jpg < /string>

< /Image>

< /DealXml>

< DealXml>

....

< /DealXml>

4

1 回答 1

0

First you need to decide on a parsing library, this article might help you: http://www.raywenderlich.com/553/how-to-chose-the-best-xml-parser-for-your-iphone-project

I would recommend using one that supports xpath which will allow you to retrieve your images using an expression such as:

//Image/string

More info about xpath here Xpath W3C

Hope this helps

于 2012-05-13T23:23:26.667 回答