[iphone] Libxml2 with a wrapper to NSArray
[iphone] Libxml2 with a wrapper to NSArray
- Subject: [iphone] Libxml2 with a wrapper to NSArray
- From: Philip Vallone <email@hidden>
- Date: Thu, 03 Dec 2009 18:40:49 -0500
Hi,
I hope I am posting this to the write list.
I am trying to parse an xml file with libxml2 and xpath. I am still learning objective c and Cocoa. I found this very useful wrapper for libxml:
http://cocoawithlove.com/2008/10/using-libxml2-for-parsing-and-xpath.html
However, I am not sure how to call this :
NSArray *PerformHTMLXPathQuery(NSData *document, NSString *query)
Here is my code:
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"manifest" ofType:@"xml"];
NSData* xmlData = [filePath dataUsingEncoding:NSUTF8StringEncoding];
NSArray *resultNodes = [NSArray array];
resultNodes = PerformXPathQuery(xmlData, "//mynode");
Here is my error:
warning: implicit declaration of function 'PerformXPathQuery'
Thanks for the help.
Phil
_______________________________________________
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