• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: XML to Plist
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: XML to Plist
      • From: Sandro Noël <email@hidden>
  • Prev by Date: Re: XML to Plist
  • Next by Date: Re: XML to Plist
  • Previous by thread: Re: XML to Plist
  • Next by thread: Re: XML to Plist
  • Index(es):
    • Date
    • Thread