minixml.h

Go to the documentation of this file.
00001 /* $Id: minixml.h,v 1.6 2006/11/30 11:47:21 nanard Exp $ */
00002 /* minimal xml parser
00003  *
00004  * Project : miniupnp
00005  * Website : http://miniupnp.free.fr/
00006  * Author : Thomas Bernard
00007  * Copyright (c) 2005 Thomas Bernard
00008  * This software is subject to the conditions detailed in the
00009  * LICENCE file provided in this distribution.
00010  * */
00011 #ifndef __MINIXML_H__
00012 #define __MINIXML_H__
00013 #define IS_WHITE_SPACE(c) ((c==' ') || (c=='\t') || (c=='\r') || (c=='\n'))
00014 
00015 /* if a callback function pointer is set to NULL,
00016  * the function is not called */
00017 struct xmlparser {
00018         const char *xmlstart;
00019         const char *xmlend;
00020         const char *xml;        /* pointer to current character */
00021         int xmlsize;
00022         void * data;
00023         void (*starteltfunc) (void *, const char *, int);
00024         void (*endeltfunc) (void *, const char *, int);
00025         void (*datafunc) (void *, const char *, int);
00026         void (*attfunc) (void *, const char *, int, const char *, int);
00027 };
00028 
00029 /* parsexml()
00030  * the xmlparser structure must be initialized before the call
00031  * the following structure members have to be initialized :
00032  * xmlstart, xmlsize, data, *func
00033  * xml is for internal usage, xmlend is computed automatically */
00034 void parsexml(struct xmlparser *);
00035 
00036 #endif
00037 

Generated on 22 Feb 2010 for Vidalia by  doxygen 1.6.1