2 # Functions to Open and Close the XML file
4 # id = xmlOpen("/tmp/file.xml");
7 void *xmlOpen(const char *);
8 void xmlClose(const void *);
11 # Get the Id of a node at the specified path
13 # xnid = xmlGetNode(id, "/path/to/specified/node");
15 void *xmlGetNode(const void *, const char *);
16 void *xmlCopyNode(void *, const char *);
19 # Functions to walk the node tree an process them one by one.
21 # xmid = xmlMarkId(id);
22 # num = xmlGetNumElements(xmid);
23 # for (i=0; i<num; i++) {
24 # if (xmlGetNextElement(id, xmid, "element") != 0) {
25 # if ((s = xmlGetString(xmid)) != 0) {
32 void *xmlMarkId(void *);
33 unsigned int xmlGetNumElements(void *, const char *);
34 void *xmlGetNextElement(const void *, void *, const char *);
37 # These functions work on the current node.
39 # xnid = xmlGetNode(id, "/path/to/last/node");
40 # i = xmlGetInt(xnid);
42 # xnid = xmlGetNode(id, "/path/to/specified/node");
43 # if (xmlCompareString(xnid, "value") == 0) printf("We have a match!\n");
45 long int xmlGetInt(void *);
46 double xmlGetDouble(void *);
47 char *xmlGetString(void *);
48 int xmlCompareString(const void *, const char *);
51 # These functions work on a specified node path
53 # d = xmlGetNodeDouble(id, "/path/to/node");
55 # xnid = xmlGetNode(id, "/path/to");
56 # i = xmlGetNodeInt(xnid, "node");
58 long int xmlGetNodeInt(void *, const char *);
59 double xmlGetNodeDouble(void *, const char *);
60 char *xmlGetNodeString(void *, const char *);
61 unsigned xmlCopyNodeString(void *, const char *, char *, const unsigned int);
62 int xmlCompareNodeString(const void *, const char *, const char *);