diff --git a/Source/NSXMLElement.m b/Source/NSXMLElement.m index 54e75f797..0f14a7e32 100644 --- a/Source/NSXMLElement.m +++ b/Source/NSXMLElement.m @@ -173,7 +173,7 @@ extern void clearPrivatePointers(xmlNodePtr aNode); // [internal->attributes removeAllObjects]; while ((key = [en nextObject]) != nil) { - NSString *val = [attributes objectForKey: key]; + NSString *val = [[attributes objectForKey: key] stringValue]; NSXMLNode *attribute = [NSXMLNode attributeWithName: key stringValue: val]; [self addAttribute: attribute];