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:
Nicola Pero 2008-01-05 21:01:40 +00:00
parent 0727937d01
commit 5c6c74539f
3 changed files with 41 additions and 0 deletions

View file

@ -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);