replace a few lost lines

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34415 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2012-01-05 15:44:45 +00:00
parent edf5a1afc1
commit 7620644234
3 changed files with 62 additions and 17 deletions

View file

@ -125,7 +125,16 @@ GS_PRIVATE_INTERNAL(NSXMLElement)
- (void) setAttributesAsDictionary: (NSDictionary*)attributes
{
ASSIGN(internal->attributes, [attributes mutableCopy]);
NSEnumerator *en = [attributes keyEnumerator];
NSString *key;
while ((key = [en nextObject]) != nil)
{
NSString *val = [attributes objectForKey: key];
NSXMLNode *attribute = [NSXMLNode attributeWithName: key
stringValue: val];
[self addAttribute: attribute];
}
}
- (NSArray*) attributes
@ -214,13 +223,14 @@ GS_PRIVATE_INTERNAL(NSXMLElement)
ASSIGN(internal->children, c);
[c release];
internal->childrenHaveMutated = YES;
// internal->childrenHaveMutated = YES;
}
- (void) addChild: (NSXMLNode*)child
{
[child setParent: self];
[internal->children addObject: child];
internal->childrenHaveMutated = YES;
// internal->childrenHaveMutated = YES;
}
- (void) replaceChildAtIndex: (NSUInteger)index withNode: (NSXMLNode*)node