From 336aa01ef3b7d561ac295f8072997cd18c9f9bae Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 13 Mar 2008 01:07:48 -0400 Subject: [PATCH] Allow the type to also display the class of object * Source/NSXMLElementAdditions.m: ([NSXMLElement(NSXMLElementAdditions) type]): If the classname attribute is present, use it --- Source/NSXMLElementAdditions.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/NSXMLElementAdditions.m b/Source/NSXMLElementAdditions.m index 1c4d6f9..9820326 100644 --- a/Source/NSXMLElementAdditions.m +++ b/Source/NSXMLElementAdditions.m @@ -83,7 +83,13 @@ */ - (NSString *)type { - return [[self attributeForName:@"type"] stringValue]; + NSXMLNode *className = [self attributeForName:@"classname"]; + NSString *type = [[self attributeForName:@"type"] stringValue]; + if (className != nil) + { + return [NSString stringWithFormat:@"%@ (%@)", [className stringValue], type]; + } + return type; } @end -- 2.43.5