我想将每个元素存储在数组中。喜欢这个链接
在此链接中有多个标签,例如 Slider、Latest Headlines、Slider1 等
有滑块和最新的标题,所以在这个相同的键缩略图和 contentId 中我想存储在单独的数组中。
任何人都让我知道如何解析它
http://bizfy.com/demo/biscoot/response1.php
<contentResponse>
<slider>
<item>
<thumbNail>http://www.bizfy.com/demo/biscoot/a1.png</thumbNail>
<contentId>img001</contentId>
</item>
<item>
<thumbNail>http://www.bizfy.com/demo/biscoot/a1.png</thumbNail>
<contentId>img002</contentId>
</item>
<item>
<thumbNail>http://www.bizfy.com/demo/biscoot/a1.png</thumbNail>
<contentId>img003</contentId>
</item>
<item>
<thumbNail>http://www.bizfy.com/demo/biscoot/a1.png</thumbNail>
<contentId>img004</contentId>
</item>
<item>
<thumbNail>http://www.bizfy.com/demo/biscoot/a1.png</thumbNail>
<contentId>img005</contentId>
</item>
</slider>
<latestHeadlines>
<item>
<thumbNail>http://www.bizfy.com/demo/biscoot/a2.png</thumbNail>
<heading>SRKs Kashmir NOstalgia</heading>
<shortDescription>
Being in Kashmir has made Shah Rukh Khan nostalgic as the superstar's father always wanted him to visit the valley. "My father's one unfulfilled wish was to bring me to Kashmir because his mom was from here.
</shortDescription>
<views>369</views>
<rating>3</rating>
<contentId>news001</contentId>
</item>
<item>
<thumbNail>http://www.bizfy.com/demo/biscoot/a2.png</thumbNail>
<heading>SRKs Kashmir NOstalgia</heading>
<shortDescription>
Being in Kashmir has made Shah Rukh Khan nostalgic as the superstar's father always wanted him to visit the valley. "My father's one unfulfilled wish was to bring me to Kashmir because his mom was from here.
</shortDescription>
<views>369</views>
<rating>3</rating>
<contentId>news001</contentId>
</item>
<item>
<thumbNail>http://www.bizfy.com/demo/biscoot/a2.png</thumbNail>
<heading>SRKs Kashmir NOstalgia</heading>
<shortDescription>
Being in Kashmir has made Shah Rukh Khan nostalgic as the superstar's father always wanted him to visit the valley. "My father's one unfulfilled wish was to bring me to Kashmir because his mom was from here.
</shortDescription>
<views>369</views>
<rating>3</rating>
<contentId>news001</contentId>
</item>
</latestHeadlines>
</contentResponse>
我想解析这种类型的xml。
请给我建议。
谢谢