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:
Doug Simons 2012-01-12 18:49:13 +00:00
parent 7fc9ff45c5
commit 065ac2bce2

View file

@ -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]);
} }