RaptureXML icon indicating copy to clipboard operation
RaptureXML copied to clipboard

Parsing XML with same keys but different attributes

Open zigzagg16 opened this issue 12 years ago • 0 comments

Hi all,

I'm parsing an RSS feed that looks like this for the items :

<item>
    <id>29</id>
    <ns:zone lang="fr">Centre</ns:zone>
    <ns:zone lang="de">Zentrum</ns:zone>
</item>

if I make this :

NSArray* items = [[rss child:@"channel"] children:@"item"];
for (RXMLElement *e in items) {
}

I only get the first item with attribute lang ="fr".

What should I do to have the value of the lang="de" ? Any idea ? (PS : I'm not the owner of the RSS, i can't change it)

Thanks a lot ! Arnaud

zigzagg16 avatar Aug 27 '13 21:08 zigzagg16