mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +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
|
@ -931,6 +931,11 @@ NSArray *execute_xpath(NSXMLNode *node,
|
|||
|
||||
- (NSArray*) nodesForXPath: (NSString*)anxpath error: (NSError**)error
|
||||
{
|
||||
if([[anxpath substringWithRange: NSMakeRange(0,1)] isEqual: @"/"] == NO)
|
||||
{
|
||||
anxpath = [@"/" stringByAppendingString: anxpath];
|
||||
}
|
||||
|
||||
*error = NULL;
|
||||
return execute_xpath(self, anxpath, NULL);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue