1
/* Header for pg xml parser interface */
3
static void *pgxml_palloc(size_t size);
4
static void *pgxml_repalloc(void *ptr, size_t size);
5
static void pgxml_pfree(void *ptr);
6
static void pgxml_mhs_init();
7
static void pgxml_handler_init();
8
Datum pgxml_parse(PG_FUNCTION_ARGS);
9
Datum pgxml_xpath(PG_FUNCTION_ARGS);
10
static void pgxml_starthandler(void *userData, const XML_Char * name,
11
const XML_Char ** atts);
12
static void pgxml_endhandler(void *userData, const XML_Char * name);
13
static void pgxml_charhandler(void *userData, const XML_Char * s, int len);
14
static void pgxml_pathcompare(void *userData);
15
static void pgxml_finalisegrabbedtext(void *userData);
17
#define MAXPATHLENGTH 512
18
#define MAXRESULTS 100
24
char *results[MAXRESULTS];
25
int32 reslens[MAXRESULTS];
26
char *resbuf; /* pointer to the result buffer for pfree */
33
char currentpath[MAXPATHLENGTH];
42
#define UD ((pgxml_udata *) userData)