Re: XML to Plist
Re: XML to Plist
- Subject: Re: XML to Plist
- From: Greg Guerin <email@hidden>
- Date: Tue, 28 Dec 2010 11:56:24 -0700
Sandro Noël wrote:
the glitch that breaks all my current logic is when there are
elements with the same name at the same level.
for instance in a RSS,
rss
chanel
item
item
item
this breaks the logic I can apply to a NSDictionary, because the
previous item gets overwritten with the current one.
That is why I've attempted to put them in array's but that had
adverse effects also.
The obvious omission in your code is a conditional test. You have to
examine the child nodes first, to determine "WHEN THERE ARE elements
with the same name at the same level" (your statement from above, my
capitalization). WHEN THERE ARE such nodes, it should do one thing,
WHEN THERE AREN'T, it should do another. All the code you've posted
does the same thing unconditionally in both cases. Your code has
neglected to act on the conditional "WHEN THERE ARE ...", even though
the conditional statement is there in what you wrote.
-- GG
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden