/*
* gjobread.c : a small test program for gnome jobs XML format
*
* See Copyright for the status of this software.
*
* Daniel.Veillard@w3.org
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
/*
* This example should compile and run indifferently with libxml-1.8.8 +
* and libxml2-2.1.0 +
* Check the COMPAT comments below
*/
/*
* COMPAT using xml-config --cflags to get the include path this will
* work with both
*/
#include <libxml/xmlmemory.h>
/*
* A person record
* an xmlChar * is really an UTF8 encoded char string (0 terminated)
*/
typedef struct person {
/*
* And the code needed to parse it
*/
static personPtr
DEBUG("parsePerson\n");
/*
* allocate the struct
*/
return(NULL);
}
/* We don't care what the top level element name is */
/* COMPAT xmlChildrenNode is a macro unifying libxml1 and libxml2 names */
}
return(ret);
}
/*
* and to print it
*/
static void
printf("------ Person\n");
printf("------\n");
}
/*
* a Description for a Job
*/
typedef struct job {
int nbDevelopers;
/*
* And the code needed to parse it
*/
static jobPtr
DEBUG("parseJob\n");
/*
* allocate the struct
*/
return(NULL);
}
/* We don't care what the top level element name is */
}
}
ret->application =
}
return(ret);
}
/*
* and to print it
*/
static void
int i;
printf("======= Job\n");
printf("======= \n");
}
/*
* A pool of Gnome Jobs
*/
typedef struct gjob {
int nbJobs;
static gJobPtr
#ifdef LIBXML_SAX1_ENABLED
/*
* build an XML tree from a the file;
*/
#else
/*
* the library has been compiled without some of the old interfaces
*/
return(NULL);
#endif /* LIBXML_SAX1_ENABLED */
/*
* Check the document is of the right kind
*/
return(NULL);
}
(const xmlChar *) "http://www.gnome.org/some-location");
"document of the wrong type, GJob Namespace not found\n");
return(NULL);
}
return(NULL);
}
/*
* Allocate the structure to be returned.
*/
return(NULL);
}
/*
* Now, walk the tree.
*/
/* First level we expect just Jobs */
}
if ( cur == 0 ) {
return ( NULL );
}
#ifdef LIBXML_OUTPUT_ENABLED
#endif /* LIBXML_OUTPUT_ENABLED */
return(NULL);
}
/* Second level is a list of Job, but be laxist */
}
}
return(ret);
}
static void
int i;
/*
* Do whatever you want and free the structure.
*/
}
int i;
/* COMPAT: Do not genrate nodes for formatting spaces */
for (i = 1; i < argc ; i++) {
if ( cur )
else
}
/* Clean up everything else before quitting. */
return(0);
}