mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
* Source/NSXMLNode.m (-rootDocument): Better test for private document.
* Source/NSXMLDTDNode.m (-initWithXMLString:): Use childAtIndex: instead of rootElement. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34991 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
79647a337e
commit
b383bbcf78
3 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2012-03-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSXMLNode.m (-rootDocument): Better test for private document.
|
||||
* Source/NSXMLDTDNode.m (-initWithXMLString:): Use childAtIndex:
|
||||
instead of rootElement.
|
||||
|
||||
2012-03-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSXMLNode.m (-copyWithZone_): Use value 1 instead of 2
|
||||
|
|
|
@ -79,7 +79,7 @@ GS_PRIVATE_INTERNAL(NSXMLDTDNode)
|
|||
error: &error];
|
||||
if (tempDoc != nil)
|
||||
{
|
||||
result = RETAIN([tempDoc rootElement]);
|
||||
result = RETAIN([tempDoc childAtIndex: 0]);
|
||||
[result detach]; // detach from document.
|
||||
}
|
||||
[tempDoc release];
|
||||
|
|
|
@ -1683,7 +1683,7 @@ execute_xpath(NSXMLNode *xmlNode, NSString *xpath_exp, NSString *nmspaces)
|
|||
{
|
||||
return nil;
|
||||
}
|
||||
if (NULL == node->parent)
|
||||
if ((NULL == node->doc) || (NULL == node->doc->children))
|
||||
{
|
||||
// This is a standalone node, we still may have a private document,
|
||||
// but we don't want to return this.
|
||||
|
|
Loading…
Reference in a new issue