Re: XML to Plist
Re: XML to Plist
- Subject: Re: XML to Plist
- From: Sandro Noël <email@hidden>
- Date: Tue, 28 Dec 2010 13:58:46 -0500
Greg,
Thank you for the input,
I was just in the process of writing that down on paper.
very appreciated!!
Sandro.
On 2010-12-28, at 1:56 PM, Greg Guerin wrote:
> 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
_______________________________________________
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