mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 09:41:15 +00:00
fix setRootElement:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/nsxml_using_libxml2@34504 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7fc9ff45c5
commit
065ac2bce2
1 changed files with 3 additions and 5 deletions
|
@ -202,19 +202,17 @@ GS_PRIVATE_INTERNAL(NSXMLDocument)
|
||||||
|
|
||||||
- (void) setRootElement: (NSXMLNode*)root
|
- (void) setRootElement: (NSXMLNode*)root
|
||||||
{
|
{
|
||||||
xmlNodePtr nodeLib = (xmlNodePtr)[root _node];
|
/*
|
||||||
xmlNodePtr selfLib = (xmlNodePtr)[self _node];
|
|
||||||
NSArray *children;
|
NSArray *children;
|
||||||
|
|
||||||
NSAssert(root == nil, NSInvalidArgumentException);
|
NSAssert(root == nil, NSInvalidArgumentException);
|
||||||
|
|
||||||
/* this method replaces *all* children with the specified element.
|
// this method replaces *all* children with the specified element.
|
||||||
*/
|
|
||||||
children = [[NSArray alloc] initWithObjects: &root count: 1];
|
children = [[NSArray alloc] initWithObjects: &root count: 1];
|
||||||
[self setChildren: children];
|
[self setChildren: children];
|
||||||
[children release];
|
[children release];
|
||||||
internal->rootElement = (NSXMLElement*)root;
|
internal->rootElement = (NSXMLElement*)root;
|
||||||
|
*/
|
||||||
// Set
|
// Set
|
||||||
xmlDocSetRootElement(MY_DOC,[root _node]);
|
xmlDocSetRootElement(MY_DOC,[root _node]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue