Le code de la chose

/*
 * Simple XInclude Processor, based on libxml2.
 *
 * Vincent Tabard (based on examples by Daniel Veillard).
 */

#include <stdio.h>
#include <string.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xinclude.h>
#include <libxml/xmlIO.h>

#ifdef LIBXML_XINCLUDE_ENABLED
static const char *cur = NULL;
static int rlen;

int main(int argc, char **argv) {
	xmlDocPtr doc;
	char *filename;
	char *outfile;
	
	/*
	 * this initialize the library and check potential ABI mismatches
	 * between the version it was compiled for and the actual shared
	 * library used.
	 */
	LIBXML_TEST_VERSION
	
	/*
	 * parse command-line options
	 */
	if(argc < 2)
	{
		fprintf(stderr, "Usage:\n %s [-o <output-file>] <file>\n", argv0);
		return (1);
	}
	if(argc > 2)
	{
		outfile = argv[2];
		filename = argv[3];
	}
	else
	{
		outfile = NULL;
		filename = argv[1];
	}
	
	/*
	 * open file for inclusions
	 */
	doc = xmlReadFile(filename, NULL, 0);
	if (doc == NULL) {
		fprintf(stderr, "Failed to parse %s\n", filename);
		return;
	}
	
	/*
	 * apply the XInclude process.
	 */
	if (xmlXIncludeProcess(doc) <= 0) {
		fprintf(stderr, "XInclude processing failed\n");
		exit(1);
	}
	
	#ifdef LIBXML_OUTPUT_ENABLED
		/*
		 * save the output for checking to stdout
		 */
		if(outfile == NULL)
		{
			xmlDocDump(stdout, doc);
		}
		else
		{
			xmlDocDump(fopen(outfile, "w"), doc);
		}
	#endif

	/*
	 * Free the document
	 */
	xmlFreeDoc(doc);
	
	/*
	 * Cleanup function for the XML library.
	 */
	xmlCleanupParser();
	return(0);
}
#else
int main(void) {
	fprintf(stderr, "XInclude support not compiled in\n");
	exit(1);
}
#endif

Now don't you worry about my boyfriend
The boy whose name is Vitorino
I don't want him, couldn't stand him
He was no good, so I...ha,ha,ha,ha,ha
Now come on, what was I supposed to do?
He was out of town and his two friends were soooooo fine.

Macarena (English version)