• 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: Parsing XML to CoreData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parsing XML to CoreData


  • Subject: Re: Parsing XML to CoreData
  • From: Siegfried <email@hidden>
  • Date: Thu, 24 Mar 2011 13:24:53 -0300

On 24/03/2011, at 13:13, Hank Heijink (Mailinglists) wrote:
> On Mar 24, 2011, at 12:06 PM, Siegfried wrote:
>
>> So, after discussing some methods to import and export a CoreData database, I ended up sticking with my initial XML idea.
>> ...
>
> You need to copy currentXMLValue, because in your code, every item that refers to it ends up referring to the same mutable string, which will change every time the parser:foundCharacters: method is called.
>
> 	NSString *newValue = [currentXMLValue copy];
> 	[currentEntity setValue:newValue forKey:kAttrName];
> 	[newValue release];
>
> Assigning strings like you did works with immutable ones, but not with mutable ones.

Ah Hank! How can I thank you?

Such a simple thing but was driving me crackers.

Thanks so much,

Best regards,

Siegfried_______________________________________________

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: Parsing XML to CoreData
      • From: Luther Baker <email@hidden>
References: 
 >Parsing XML to CoreData (From: Siegfried <email@hidden>)
 >Re: Parsing XML to CoreData (From: "Hank Heijink (Mailinglists)" <email@hidden>)

  • Prev by Date: Re: Parsing XML to CoreData
  • Next by Date: Re: Exporting and Importing CoreData
  • Previous by thread: Re: Parsing XML to CoreData
  • Next by thread: Re: Parsing XML to CoreData
  • Index(es):
    • Date
    • Thread