diff --git a/Source/Additions/GSXML.m b/Source/Additions/GSXML.m index 7837b7900..c49279920 100644 --- a/Source/Additions/GSXML.m +++ b/Source/Additions/GSXML.m @@ -54,13 +54,13 @@ #include /* libxml headers */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include extern int xmlDoValidityCheckingDefaultValue; extern int xmlGetWarningsDefaultValue; @@ -186,7 +186,7 @@ static NSMapTable *attrNames = 0; + (NSString*) descriptionFromType: (int)type { - NSString *desc = (NSString*)NSMapGet(attrNames, (void*)[self type]); + NSString *desc = (NSString*)NSMapGet(attrNames, (void*)type); return desc; } @@ -268,14 +268,19 @@ static NSMapTable *attrNames = 0; */ + (GSXMLDocument*) documentWithVersion: (NSString*)version { - void *data = xmlNewDoc([version UTF8String]); + void *data = xmlNewDoc([version UTF8String]); + GSXMLDocument *document = nil; if (data == 0) { NSLog(@"Can't create GSXMLDocument object"); - DESTROY(self); } - return [self _initFrom: data parent: nil ownsLib: YES]; + else + { + document = [GSXMLDocument alloc]; + document = [document _initFrom: data parent: nil ownsLib: YES]; + } + return AUTORELEASE(document); } + (void) initialize @@ -475,7 +480,7 @@ static NSMapTable *nsNames = 0; */ + (NSString*) descriptionFromType: (int)type { - NSString *desc = (NSString*)NSMapGet(nsNames, (void*)[self type]); + NSString *desc = (NSString*)NSMapGet(nsNames, (void*)type); return desc; } @@ -652,7 +657,7 @@ static NSMapTable *nodeNames = 0; */ + (NSString*) descriptionFromType: (int)type { - NSString *desc = (NSString*)NSMapGet(nodeNames, (void*)[self type]); + NSString *desc = (NSString*)NSMapGet(nodeNames, (void*)type); return desc; } diff --git a/Tools/AGSHtml.m b/Tools/AGSHtml.m index 5524bf8cc..02a31edfb 100644 --- a/Tools/AGSHtml.m +++ b/Tools/AGSHtml.m @@ -444,7 +444,7 @@ static NSMutableSet *textNodes = nil; if ([node type] == XML_ELEMENT_NODE) { NSString *name = [node name]; - NSDictionary *prop = [node propertiesAsDictionary]; + NSDictionary *prop = [node attributes]; if ([name isEqual: @"back"] == YES) { @@ -826,7 +826,7 @@ static NSMutableSet *textNodes = nil; str = [str stringByAppendingString: @", "]; } - s = [[tmp propertiesAsDictionary] objectForKey: @"type"]; + s = [[tmp attributes] objectForKey: @"type"]; s = [self typeRef: s]; str = [str stringByAppendingString: s]; @@ -1004,16 +1004,16 @@ static NSMutableSet *textNodes = nil; if (url == nil) { [buf appendString: @"
"]; - [buf appendString: [[author propertiesAsDictionary] + [buf appendString: [[author attributes] objectForKey: @"name"]]; } else { [buf appendString: @"
"]; - [buf appendString: [[author propertiesAsDictionary] + [buf appendString: [[author attributes] objectForKey: @"name"]]; [buf appendString: @""]; } @@ -1223,7 +1223,7 @@ static NSMutableSet *textNodes = nil; GSXMLNode *t = [tmp firstChild]; NSString *s; - s = [[tmp propertiesAsDictionary] objectForKey: @"type"]; + s = [[tmp attributes] objectForKey: @"type"]; s = [self typeRef: s]; str = [str stringByAppendingFormat: @" (%@)", s]; while (t != nil) diff --git a/Tools/AGSIndex.m b/Tools/AGSIndex.m index c791cfb6c..7182ff353 100644 --- a/Tools/AGSIndex.m +++ b/Tools/AGSIndex.m @@ -224,7 +224,7 @@ setDirectory(NSMutableDictionary *dict, NSString *path) if ([node type] == XML_ELEMENT_NODE) { NSString *name = [node name]; - NSDictionary *prop = [node propertiesAsDictionary]; + NSDictionary *prop = [node attributes]; if ([name isEqual: @"category"] == YES) {