@@ -217,50 +217,44 @@ [self freeMemory: str_c]; } return ret; } -- addAttribute: (OFXMLAttribute*)attr +- (void)addAttribute: (OFXMLAttribute*)attr { if (attrs == nil) attrs = [[OFMutableArray alloc] init]; /* FIXME: Prevent having it twice! */ [attrs addObject: attr]; - - return self; } -- addAttributeWithName: (OFString*)name_ - stringValue: (OFString*)value +- (void)addAttributeWithName: (OFString*)name_ + stringValue: (OFString*)value { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [self addAttribute: [OFXMLAttribute attributeWithName: name_ prefix: nil namespace: nil stringValue: value]]; [pool release]; - - return self; } /* TODO: Replace attribute */ /* TODO: Remove attribute */ -- addChild: (OFXMLElement*)child +- (void)addChild: (OFXMLElement*)child { if (stringval != nil) @throw [OFInvalidArgumentException newWithClass: isa selector: _cmd]; if (children == nil) children = [[OFMutableArray alloc] init]; [children addObject: child]; - - return self; } - (void)dealloc { [name release]; @@ -271,11 +265,11 @@ [super dealloc]; } @end @implementation OFString (OFXMLEscaping) -- stringByXMLEscaping +- (OFString*)stringByXMLEscaping { char *str_c, *append, *tmp; size_t len, append_len; size_t i, j; OFString *ret;