xpathparser.c File Reference

#include "xsb_config.h"
#include <assert.h>
#include "cinterf.h"
#include <libxml/xpathInternals.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include "fetch_file.c"

Defines

#define MY_ENCODING   "ISO-8859-1"
#define MAXSTRLEN   256
#define MAXSTRINGLEN   32000

Enumerations

enum  plerrorid {
  ERR_ERRNO, ERR_TYPE, ERR_DOMAIN, ERR_EXISTENCE,
  ERR_FAIL, ERR_LIMIT, ERR_MISC
}

Functions

int xpath_error (plerrorid,...)
int execute_xpath_expression (const char *xmlsource, const xmlChar *xpathExpr, const xmlChar *nsList, prolog_term output_term, char flag)
int register_namespaces (xmlXPathContextPtr xpathCtx, const xmlChar *nsList)
void print_xpath_nodes (xmlNodeSetPtr nodes, FILE *output)
DllExport int call_conv allocate_xpath_error_term__ ()
DllExport int call_conv parse_xpath__ ()

Variables

prolog_term xpath_error_term

Define Documentation

#define MAXSTRINGLEN   32000
 

#define MAXSTRLEN   256
 

#define MY_ENCODING   "ISO-8859-1"
 


Enumeration Type Documentation

enum plerrorid
 

Enumerator:
ERR_ERRNO 
ERR_TYPE 
ERR_DOMAIN 
ERR_EXISTENCE 
ERR_FAIL 
ERR_LIMIT 
ERR_MISC 


Function Documentation

DllExport int call_conv allocate_xpath_error_term__  ) 
 

Allocate the global error term. This term is used to throw the exception on the prolog side. Input : none Output : none

int execute_xpath_expression const char *  xmlsource,
const xmlChar xpathExpr,
const xmlChar nsList,
prolog_term  output_term,
char  flag
 

This is the main function which evaluates the xpath query on the xml input Input : xml source, xpath query, namespace prefix, type of xml source (file or buffer) Output : Resultant xml

DllExport int call_conv parse_xpath__  ) 
 

This is the main function used to evaluate the xpath expression Input : Xml source, xpath expression, namespace prefix specifications Output : Resultant xml after evaluating xpath

void print_xpath_nodes xmlNodeSetPtr  nodes,
FILE *  output
 

int register_namespaces xmlXPathContextPtr  xpathCtx,
const xmlChar nsList
 

Register the namespaces prefixes to be used in xpath expressions while handling namespaces Input : pointer to context object, list of prefix = naamespace url Output : TRUE on success/ FALSE on failure

int xpath_error plerrorid  id,
  ...
 

Error handling term. Creates error term to throw on the prolog side Input : error type Output : TRUE on success/ FALSE on failure


Variable Documentation

prolog_term xpath_error_term
 


Generated on Wed Jul 26 13:26:57 2006 for XSB by  doxygen 1.4.5