/* $Id: minixml.h,v 1.6 2006/11/30 11:47:21 nanard Exp $ */1/* minimal xml parser2*3* Project : miniupnp4* Website : http://miniupnp.free.fr/5* Author : Thomas Bernard6* Copyright (c) 2005 Thomas Bernard7* This software is subject to the conditions detailed in the8* LICENCE file provided in this distribution.9* */10#ifndef MINIXML_H_INCLUDED11#define MINIXML_H_INCLUDED12#define IS_WHITE_SPACE(c) ((c)==' ' || (c)=='\t' || (c)=='\r' || (c)=='\n')1314/* if a callback function pointer is set to NULL,15* the function is not called */16struct xmlparser {17const char *xmlstart;18const char *xmlend;19const char *xml; /* pointer to current character */20int xmlsize;21void * data;22void (*starteltfunc) (void *, const char *, int);23void (*endeltfunc) (void *, const char *, int);24void (*datafunc) (void *, const char *, int);25void (*attfunc) (void *, const char *, int, const char *, int);26};2728/* parsexml()29* the xmlparser structure must be initialized before the call30* the following structure members have to be initialized :31* xmlstart, xmlsize, data, *func32* xml is for internal usage, xmlend is computed automatically */33void parsexml(struct xmlparser *);3435#endif36373839