Parse xml file with same tag multiple times iphone sdk

Posted by neha on Stack Overflow See other posts from Stack Overflow or by neha
Published on 2010-06-09T06:31:30Z Indexed on 2010/06/09 6:42 UTC
Read the original article Hit count: 170

Filed under:
|

Hi all,

In my application, I have a tag multiple times. I'm using xml parser. I'm taking a corresponding element with similar name as the one in xml file in my class. So in case of:

 <photo>abc</photo>
 <photo>def</photo>

What I get in photo element of my class is the second element i.e def, as the first one gets overwritten as there's only one photo element in my class. My question is am I wrong in taking similar elements in class as in case of xml? Is there any better method or a better parser? Or I'm on right path and have to do this manually by setting some flags etc?

Thanx in advance.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about nsxmlparser