discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trouble with GSXML on mac


From: Jon Brisbin
Subject: Trouble with GSXML on mac
Date: Tue, 5 Jul 2005 11:53:21 -0500

I have this simple test program:

#include <Foundation/Foundation.h>
#include <GNUstepBase/GSXML.h>

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

NSString *xmlIn = [[NSString alloc] initWithString: @"/opt/java/projects/www/xportaldefs/map/sitemap.xml"];
        GSXMLParser *p = [GSXMLParser parserWithContentsOfFile: xmlIn];
        
        if([p parse]) {
          NSLog(@"Parsed XML file!");
          GSXMLDocument *doc = [p document];
          GSXPathContext *xc = [[GSXPathContext alloc] initWithDocument: doc];
          GSXPathNodeSet *ns = [xc evaluateExpression: @"//uri"];
          GSPrintf(@"Found %d URIs\n", [ns count]);
        } else {
          NSLog(@"Couldn't parse XML file!");
        }

        [pool release];

    return 0;
}

It compiles and links fine (now that I added ADDITIONAL_TOOL_LIBS for -lgnustep-baseadd) but I get this error when I run the thing:

2005-07-05 11:48:25.687 xportal[9103] *** +[NSString superclassDescription]: selector not recognized 2005-07-05 11:48:25.689 xportal[9103] *** Uncaught exception: <NSInvalidArgumentException> *** +[NSString superclassDescription]: selector not recognized
Trace/BPT trap

This occurs at the [p parse] in the "if" statement.

Since I just compiled the gnustep-baseadd stuff, I'm wondering if there's a disconnect between the Apple stuff and the GNUstep stuff, which is causing an error like this.

If there's any kind of testing you folks want me to do on my PowerBook, I'd be more than happy to help. I'm not an experienced GNUstep programmer, but I know my way around the Mac and Unix well enough to maybe help iron out the bugs on GNUstep for Mac.

Thanks for your help and ideas!

Jon Brisbin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]