fixed to point to releases of libxml2-2.6, Daniel
diff --git a/doc/example.html b/doc/example.html
index 29d6efc..b84524f 100644
--- a/doc/example.html
+++ b/doc/example.html
@@ -11,12 +11,12 @@
data is not kept in the DOM tree but uses internal structures. It is based on
a proposal to keep a database of jobs related to Gnome, with an XML based
storage structure. Here is an <a href="gjobs.xml">XML encoded jobs
-base</a>:</p><pre><?xml version="1.0"?>
-<gjob:Helping xmlns:gjob="http://www.gnome.org/some-location">
+base</a>:</p><pre><?xml version="1.0"?>
+<gjob:Helping xmlns:gjob="http://www.gnome.org/some-location">
<gjob:Jobs>
<gjob:Job>
- <gjob:Project ID="3"/>
+ <gjob:Project ID="3"/>
<gjob:Application>GBackup</gjob:Application>
<gjob:Category>Development</gjob:Category>
@@ -91,13 +91,13 @@
personPtr parsePerson(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) {
personPtr ret = NULL;
-DEBUG("parsePerson\n");
+DEBUG("parsePerson\n");
/*
* allocate the struct
*/
ret = (personPtr) malloc(sizeof(person));
if (ret == NULL) {
- fprintf(stderr,"out of memory\n");
+ fprintf(stderr,"out of memory\n");
return(NULL);
}
memset(ret, 0, sizeof(person));
@@ -105,9 +105,9 @@
/* We don't care what the top level element name is */
cur = cur->xmlChildrenNode;
while (cur != NULL) {
- if ((!strcmp(cur->name, "Person")) && (cur->ns == ns))
+ if ((!strcmp(cur->name, "Person")) && (cur->ns == ns))
ret->name = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
- if ((!strcmp(cur->name, "Email")) && (cur->ns == ns))
+ if ((!strcmp(cur->name, "Email")) && (cur->ns == ns))
ret->email = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
cur = cur->next;
}
@@ -146,13 +146,13 @@
jobPtr parseJob(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) {
jobPtr ret = NULL;
-DEBUG("parseJob\n");
+DEBUG("parseJob\n");
/*
* allocate the struct
*/
ret = (jobPtr) malloc(sizeof(job));
if (ret == NULL) {
- fprintf(stderr,"out of memory\n");
+ fprintf(stderr,"out of memory\n");
return(NULL);
}
memset(ret, 0, sizeof(job));
@@ -161,17 +161,17 @@
cur = cur->xmlChildrenNode;
while (cur != NULL) {
- if ((!strcmp(cur->name, "Project")) && (cur->ns == ns)) {
- ret->projectID = xmlGetProp(cur, "ID");
+ if ((!strcmp(cur->name, "Project")) && (cur->ns == ns)) {
+ ret->projectID = xmlGetProp(cur, "ID");
if (ret->projectID == NULL) {
- fprintf(stderr, "Project has no ID\n");
+ fprintf(stderr, "Project has no ID\n");
}
}
- if ((!strcmp(cur->name, "Application")) && (cur->ns == ns))
+ if ((!strcmp(cur->name, "Application")) && (cur->ns == ns))
ret->application = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
- if ((!strcmp(cur->name, "Category")) && (cur->ns == ns))
+ if ((!strcmp(cur->name, "Category")) && (cur->ns == ns))
ret->category = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
- if ((!strcmp(cur->name, "Contact")) && (cur->ns == ns))
+ if ((!strcmp(cur->name, "Contact")) && (cur->ns == ns))
ret->contact = parsePerson(doc, ns, cur);
cur = cur->next;
}