mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Added method to register namespaces with XPath
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25874 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0727937d01
commit
5c6c74539f
3 changed files with 41 additions and 0 deletions
|
@ -70,6 +70,7 @@
|
|||
#include <libxml/HTMLparser.h>
|
||||
#include <libxml/xmlmemory.h>
|
||||
#include <libxml/xpath.h>
|
||||
#include <libxml/xpathInternals.h>
|
||||
|
||||
#ifdef HAVE_LIBXSLT
|
||||
#include <libxslt/xslt.h>
|
||||
|
@ -3753,6 +3754,19 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
return result;
|
||||
}
|
||||
|
||||
- (BOOL) registerNamespaceWithPrefix: (NSString *)prefix
|
||||
href: (NSString *)href
|
||||
{
|
||||
if (xmlXPathRegisterNs (_lib, UTF8STRING(prefix), UTF8STRING(href)) != 0)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
else
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
xmlXPathFreeContext (_lib);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue