mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
* Headers/Foundation/NSXMLDocument.h
* Headers/Foundation/NSXMLElement.h * Headers/Foundation/NSXMLNode.h: Move declarations. * Source/NSXMLDocument.m: Correct parsing issues. * Source/NSXMLElement.m: Remove local declaration of _children * Source/NSXMLNode.m: Remove internal. Move all declarations here directly. 2012-01-03 14:22-EST Gregory John Casamento <greg.casamento@gmail.com> git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34408 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
aa8a33f26c
commit
6cbe121535
7 changed files with 73 additions and 62 deletions
|
@ -32,7 +32,6 @@
|
|||
{
|
||||
[_attributes release];
|
||||
[_namespaces release];
|
||||
[_children release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -105,7 +104,15 @@
|
|||
|
||||
- (void) setAttributesAsDictionary: (NSDictionary*)attributes
|
||||
{
|
||||
ASSIGN(_attributes, [attributes mutableCopy]);
|
||||
NSString *key = nil;
|
||||
NSEnumerator *en = [attributes keyEnumerator];
|
||||
|
||||
while((key = [en nextObject]) != nil)
|
||||
{
|
||||
NSXMLNode *attribute = [NSXMLNode attributeWithName: key
|
||||
stringValue: [attributes objectForKey: key]];
|
||||
[self addAttribute: attribute];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSArray*) attributes
|
||||
|
@ -191,13 +198,14 @@
|
|||
- (void) setChildren: (NSArray*)children
|
||||
{
|
||||
ASSIGN(_children, [children mutableCopy]);
|
||||
_childrenHaveMutated = YES;
|
||||
// _childrenHaveMutated = YES;
|
||||
}
|
||||
|
||||
- (void) addChild: (NSXMLNode*)child
|
||||
{
|
||||
[child setParent: self];
|
||||
[_children addObject: child];
|
||||
_childrenHaveMutated = YES;
|
||||
// _childrenHaveMutated = YES;
|
||||
}
|
||||
|
||||
- (void) replaceChildAtIndex: (NSUInteger)index withNode: (NSXMLNode*)node
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue