#include <stdio.h>
#include <stdlib.h>
#include <libxml/tree.h>


static void
xml_structured_err(void *user_data, xmlError *error)
{
	fprintf(stderr, "%s:%d:%d: %s\n",
		error->file ? error->file : "<null>",
		error->line,
		error->int2,
		error->message);
}


int
main(int argc, char **argv)
{
	char	*xml_filename;
	xmlDoc	*doc;

	if (argv[1] == NULL) {
		fprintf(stderr, "usage: %s filename\n", argv[0]);
		exit(1);
	}
	xml_filename = argv[1];

	xmlSetStructuredErrorFunc(NULL, xml_structured_err);

	doc = xmlParseFile(xml_filename);
	exit(0);
}
