nodesForXPath does not seem to work in Address Book Plug-Ins
nodesForXPath does not seem to work in Address Book Plug-Ins
- Subject: nodesForXPath does not seem to work in Address Book Plug-Ins
- From: "Gernot Poetsch" <email@hidden>
- Date: Wed, 6 Jun 2007 21:07:19 +0200
Hello,
I've got a strange problem developing an Address Book Plug-in. In the
plugin I parse XML-Data, but somehow -[NSXMLDocument
nodesForXPath:error:] does always return an empty array. Have a lookat
the following code:
NSXMLDocument *document = [NSXMLDocument
documentWithRootElement:[NSXMLElement elementWithName:@"root"]];
NSArray *xPathResults = [document nodesForXPath:@"." error:NULL];
NSLog(@"XPath Results: %@", xPathResults);
In normal Applications the xPathResults variable is an array with one
element. When put into an Address Book Plug-in the exactly same code
produces an empty array. Here's what I did to make the plug-in:
- Make a new Project: Select "Address-Book Plug-In for Objective-C"
- Replace the contents of -performActionForPerson:identifier: with the
code above.
I'm using OSX 10.4.9 and XCode 2.4.1
Does anyone know what causes this? Should I file a Bug report? Is
there anything I can do about it? Any help would be greatly
appreciated!
Greetings,
Gernot Poetsch.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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