TORCS  1.3.9
The Open Racing Car Simulator
xml.h
Go to the documentation of this file.
1 /*
2  * xml.h -- Interface file for XML
3  *
4  * @(#) $Id$
5  */
6 
7 #ifndef _XML_H_
8 #define _XML_H_
9 
10 typedef struct xmlAttribute {
11  char *name;
12  char *value;
13  struct xmlAttribute *next;
15 
16 typedef struct xmlElement {
17  char *name; /* element name */
18  char *pcdata; /* string associated with this element */
19  struct xmlAttribute *attr; /* attributes of this element */
20  int level; /* nested level */
21  struct xmlElement *next; /* next element at the same level */
22  struct xmlElement *sub; /* next element at the next level (nested) */
23  struct xmlElement *up; /* upper element */
24 } txmlElement;
25 
26 extern txmlElement *xmlInsertElt(txmlElement *curElt, const char *name, const char **atts);
27 extern txmlElement *xmlReadFile(const char *file);
28 extern int xmlWriteFile(const char *file, txmlElement *startElt, char *dtd);
29 extern char *xmlGetAttr(txmlElement *curElt, char *attrname);
30 extern txmlElement *xmlNextElt(txmlElement *startElt);
31 extern txmlElement *xmlSubElt(txmlElement *startElt);
32 extern txmlElement *xmlWalkElt(txmlElement *startElt);
33 extern txmlElement *xmlWalkSubElt(txmlElement *startElt, txmlElement *topElt);
34 extern txmlElement *xmlFindNextElt(txmlElement *startElt, char *name);
35 extern txmlElement *xmlFindEltAttr(txmlElement *startElt, char *name, char *attrname, char *attrvalue);
36 
37 #endif /* _XML_H_ */
38 
39 
40 
txmlElement * xmlWalkSubElt(txmlElement *startElt, txmlElement *topElt)
Definition: xml.cpp:509
txmlElement * xmlReadFile(const char *file)
Definition: xml.cpp:237
txmlElement * xmlFindNextElt(txmlElement *startElt, char *name)
Definition: xml.cpp:553
char * name
Definition: xml.h:17
struct xmlAttribute * attr
Definition: xml.h:19
txmlElement * xmlSubElt(txmlElement *startElt)
Definition: xml.cpp:440
char * value
Definition: xml.h:12
char * pcdata
Definition: xml.h:18
struct xmlElement * sub
Definition: xml.h:22
txmlElement * xmlFindEltAttr(txmlElement *startElt, char *name, char *attrname, char *attrvalue)
Definition: xml.cpp:587
struct xmlElement * next
Definition: xml.h:21
struct xmlAttribute txmlAttribute
char * name
Definition: xml.h:11
Definition: xml.h:16
struct xmlElement txmlElement
char * xmlGetAttr(txmlElement *curElt, char *attrname)
Definition: xml.cpp:378
struct xmlAttribute * next
Definition: xml.h:13
txmlElement * xmlWalkElt(txmlElement *startElt)
Definition: xml.cpp:466
int level
Definition: xml.h:20
txmlElement * xmlNextElt(txmlElement *startElt)
Definition: xml.cpp:410
struct xmlElement * up
Definition: xml.h:23
int xmlWriteFile(const char *file, txmlElement *startElt, char *dtd)
Definition: xml.cpp:340
txmlElement * xmlInsertElt(txmlElement *curElt, const char *name, const char **atts)
Definition: xml.cpp:123