mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
fixed problem with relative xpath expressions
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/nsxml_using_libxml2@34596 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a5d9f67a89
commit
83c45d4850
1 changed files with 3 additions and 0 deletions
|
@ -253,6 +253,9 @@ NSArray *execute_xpath(NSXMLNode *node,
|
|||
return nil;
|
||||
}
|
||||
|
||||
if (![xpath_exp hasPrefix:@"/"])
|
||||
xpathCtx->node = doc; // provide a context for relative paths
|
||||
|
||||
/* Evaluate xpath expression */
|
||||
xpathObj = xmlXPathEvalExpression(xpathExpr, xpathCtx);
|
||||
if(xpathObj == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue