mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
* Source/NSXMLDocument.m
* Source/NSXMLNode.m: Add / to xpath if it is not there. Thes matches behavior observed on Mac OS X/Cocoa. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/nsxml_using_libxml2@34562 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c28fe9a54b
commit
96e464fc49
3 changed files with 17 additions and 1 deletions
|
@ -218,8 +218,9 @@ extern void clearPrivatePointers(xmlNodePtr aNode);
|
|||
|
||||
- (void) setRootElement: (NSXMLNode*)root
|
||||
{
|
||||
#warning properly dispose of old root element.
|
||||
// #warning properly dispose of old root element.
|
||||
xmlNodePtr newrootnode;
|
||||
id oldElement = [self rootElement];
|
||||
|
||||
if(root == nil)
|
||||
{
|
||||
|
@ -229,6 +230,10 @@ extern void clearPrivatePointers(xmlNodePtr aNode);
|
|||
xmlDocSetRootElement(MY_DOC,[root _node]);
|
||||
newrootnode = MY_DOC->children;
|
||||
newrootnode->_private = root; // hmmm, this probably isn't where this belongs, but try it...
|
||||
|
||||
// Get rid of old element...
|
||||
// xmlFree([oldElement _node]);
|
||||
oldElement = nil; // is this correct??
|
||||
}
|
||||
|
||||
- (void) setStandalone: (BOOL)standalone
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue