Re: [iphone] Libxml2 with a wrapper to NSArray

2009-12-04 Thread Philip Vallone
Good point - Thanks On Dec 4, 2009, at 1:32 PM, Alexander Spohr wrote: > > Am 04.12.2009 um 10:09 schrieb Philip Vallone: > >> Next I had a syntax error when declaring my NSArray and like you said it was >> pointing to an empty array: >> >> NSArray* result = [NSArray arrayWithArray:Per

Re: [iphone] Libxml2 with a wrapper to NSArray

2009-12-04 Thread Alexander Spohr
Am 04.12.2009 um 10:09 schrieb Philip Vallone: > Next I had a syntax error when declaring my NSArray and like you said it was > pointing to an empty array: > > NSArray* result = [NSArray arrayWithArray:PerformXMLXPathQuery(xmlData, > @"//mynode")]; Why are you putting the contents of th

Re: [iphone] Libxml2 with a wrapper to NSArray

2009-12-04 Thread Philip Vallone
Hi Thanks for the help. I did not receive any message from Sean, but your comments lead me in the right direction. First I changed xmlData to: NSData * xmlData = [NSData dataWithContentsOfFile: filePath]; Next I had a syntax error when declaring my NSArray and like you said it was poi

Re: [iphone] Libxml2 with a wrapper to NSArray

2009-12-03 Thread Fritz Anderson
On 3 Dec 2009, at 5:40 PM, Philip Vallone wrote: > NSString *filePath = [[NSBundle mainBundle] pathForResource:@"manifest" > ofType:@"xml"]; > NSData* xmlData = [filePath dataUsingEncoding:NSUTF8StringEncoding]; Separate from Sean's help, sending dataUsingEncoding: to an NSS

Re: [iphone] Libxml2 with a wrapper to NSArray

2009-12-03 Thread Sean McBride
On 12/3/09 6:40 PM, Philip Vallone said: >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*

[iphone] Libxml2 with a wrapper to NSArray

2009-12-03 Thread Philip Vallone
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 ho