• 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: NSXMLParser and NSDocument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSXMLParser and NSDocument


  • Subject: Re: NSXMLParser and NSDocument
  • From: Jeffrey Oleander <email@hidden>
  • Date: Thu, 30 Apr 2009 12:36:48 -0700 (PDT)

> On Tue, 2009/04/28, Graham Cox <email@hidden> wrote:
>> On 2009/04/29, at 08:34, Jeffrey Oleander wrote:
>> I've been having 2 intermittent compilation errors
>> on 10.3.9 in
>> - (BOOL)loadDataRepresentation:(NSData*)data
>> ofType:(NSString*)fileType
>> {
>>     BOOL success;
>>     NSString * lowercaseFileType =
>> [fileType lowercaseString];
>>     NSLog(@"fileType=%S",
>> lowercaseFileType);

> %S specifies a null-terminated array of 16-bit unicode
> characters. What you're passing is an NSString object.
> So the specifier should be the object specifier, %@.

Yes, that is what I had tried first.  Still, the warning
comes and goes.

>> The second is
>> error: parse error before "JGOXMLParser"
>> and point to
>> [xmlParser setDelegate:JGOXMLParser];
>>
>> I understand that – loadDataRepresentation:ofType:
>> method is valid in 10.3.9 but deprecated in 10.4
>> but I have to work with what I have.
>>
>> Does the delegate have to be an instance?
>
> It has to be an instance of *something*.

OK, Thanks.

That leaves only, what's the namespaceURI parameter in
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict

The examples do not show and the reference says "namespaceURI
If namespace processing is turned on, contains the URI for the current namespace as a string object." so I'm going to let it be an empty string.

I've submitted comments to the documentation.



_______________________________________________

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: NSXMLParser and NSDocument
      • From: Marcel Weiher <email@hidden>
  • Prev by Date: Re: Scheduling a selector when a thread completes
  • Next by Date: create object from class name held in String?
  • Previous by thread: Re: NSXMLParser and NSDocument
  • Next by thread: Re: NSXMLParser and NSDocument
  • Index(es):
    • Date
    • Thread