Vidalia 0.3.1
minixml.h
Go to the documentation of this file.
1/* $Id: minixml.h,v 1.6 2006/11/30 11:47:21 nanard Exp $ */
2/* minimal xml parser
3 *
4 * Project : miniupnp
5 * Website : http://miniupnp.free.fr/
6 * Author : Thomas Bernard
7 * Copyright (c) 2005 Thomas Bernard
8 * This software is subject to the conditions detailed in the
9 * LICENCE file provided in this distribution.
10 * */
11#ifndef __MINIXML_H__
12#define __MINIXML_H__
13#define IS_WHITE_SPACE(c) ((c==' ') || (c=='\t') || (c=='\r') || (c=='\n'))
14
15/* if a callback function pointer is set to NULL,
16 * the function is not called */
17struct xmlparser {
18 const char *xmlstart;
19 const char *xmlend;
20 const char *xml; /* pointer to current character */
22 void * data;
23 void (*starteltfunc) (void *, const char *, int);
24 void (*endeltfunc) (void *, const char *, int);
25 void (*datafunc) (void *, const char *, int);
26 void (*attfunc) (void *, const char *, int, const char *, int);
27};
28
29/* parsexml()
30 * the xmlparser structure must be initialized before the call
31 * the following structure members have to be initialized :
32 * xmlstart, xmlsize, data, *func
33 * xml is for internal usage, xmlend is computed automatically */
34void parsexml(struct xmlparser *);
35
36#endif
37
stop errmsg void
void parsexml(struct xmlparser *)
void(* endeltfunc)(void *, const char *, int)
Definition: minixml.h:24
void(* datafunc)(void *, const char *, int)
Definition: minixml.h:25
void * data
Definition: minixml.h:22
const char * xml
Definition: minixml.h:20
void(* attfunc)(void *, const char *, int, const char *, int)
Definition: minixml.h:26
const char * xmlstart
Definition: minixml.h:18
int xmlsize
Definition: minixml.h:21
const char * xmlend
Definition: minixml.h:19
void(* starteltfunc)(void *, const char *, int)
Definition: minixml.h:23