mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
implemented XPath method
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/nsxml_using_libxml2@34603 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
83dfcdf77a
commit
0262025e3b
1 changed files with 3 additions and 2 deletions
|
@ -254,7 +254,7 @@ NSArray *execute_xpath(NSXMLNode *node,
|
|||
}
|
||||
|
||||
if (![xpath_exp hasPrefix:@"/"])
|
||||
xpathCtx->node = doc; // provide a context for relative paths
|
||||
xpathCtx->node = (xmlNodePtr)doc; // provide a context for relative paths
|
||||
|
||||
/* Evaluate xpath expression */
|
||||
xpathObj = xmlXPathEvalExpression(xpathExpr, xpathCtx);
|
||||
|
@ -1037,7 +1037,8 @@ NSArray *execute_xpath(NSXMLNode *node,
|
|||
|
||||
- (NSString*) XPath
|
||||
{
|
||||
return [self notImplemented: _cmd];
|
||||
xmlNodePtr node = MY_NODE;
|
||||
return StringFromXMLStringPtr(xmlGetNodePath(node));
|
||||
}
|
||||
|
||||
- (NSArray*) nodesForXPath: (NSString*)anxpath error: (NSError**)error
|
||||
|
|
Loading…
Reference in a new issue