kstars
lilxml.h
Go to the documentation of this file.00001 #if 0
00002 liblilxml
00003 Copyright (C) 2003 Elwood C. Downey
00004
00005 This library is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU Lesser General Public
00007 License as published by the Free Software Foundation; either
00008 version 2.1 of the License, or (at your option) any later version.
00009
00010 This library is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00013 Lesser General Public License for more details.
00014
00015 You should have received a copy of the GNU Lesser General Public
00016 License along with this library; if not, write to the Free Software
00017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00018
00019 #endif
00020
00060 #ifndef LILXML_H
00061 #define LILXML_H
00062
00063 #ifdef __cplusplus
00064 extern "C" {
00065 #endif
00066
00067
00068 typedef struct _xml_att XMLAtt;
00069 typedef struct _xml_ele XMLEle;
00070 typedef struct _LilXML LilXML;
00071
00076
00077
00078
00082 extern LilXML *newLilXML(void);
00083
00087 extern void delLilXML (LilXML *lp);
00088
00092 extern void delXMLEle (XMLEle *e);
00093
00100 extern XMLEle *readXMLEle (LilXML *lp, int c, char errmsg[]);
00101
00102
00108 extern XMLAtt *findXMLAtt (XMLEle *e, const char *name);
00109
00115 extern XMLEle *findXMLEle (XMLEle *e, const char *tag);
00116
00117
00123 extern XMLEle *nextXMLEle (XMLEle *ep, int first);
00124
00130 extern XMLAtt *nextXMLAtt (XMLEle *ep, int first);
00131
00132
00136 extern XMLEle *parentXMLEle (XMLEle *ep);
00137
00141 extern XMLEle *parentXMLAtt (XMLAtt *ap);
00142
00143
00148 extern char *tagXMLEle (XMLEle *ep);
00149
00154 extern char *pcdataXMLEle (XMLEle *ep);
00155
00160 extern char *nameXMLAtt (XMLAtt *ap);
00161
00166 extern char *valuXMLAtt (XMLAtt *ap);
00167
00172 extern int pcdatalenXMLEle (XMLEle *ep);
00173
00178 extern int nXMLEle (XMLEle *ep);
00179
00184 extern int nXMLAtt (XMLEle *ep);
00185
00186
00192 extern const char *findXMLAttValu (XMLEle *ep, char *name);
00193
00200 extern XMLEle *readXMLFile (FILE *fp, LilXML *lp, char errmsg[]);
00201
00207 extern void prXMLEle (FILE *fp, XMLEle *e, int level);
00208
00209
00210 extern void indi_xmlMalloc (void *(*newmalloc)(size_t size),
00211 void *(*newrealloc)(void *ptr, size_t size), void (*newfree)(void *ptr));
00212
00215 #ifdef __cplusplus
00216 }
00217 #endif
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252 #endif