File:  [ELWIX - Embedded LightWeight unIX -] / gpl / axl / test / test_01a.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Jun 8 07:09:12 2011 UTC (12 years, 11 months ago) by misho
Branches: axl, MAIN
CVS tags: HEAD, AXL0_6_7, AXL0_6_1
3th party - XML

#include <axl.h>
#include <stdio.h>

int main (int argc, char ** argv)
{
	axlError * error = NULL;

	/* top level definitions */
	axlDoc * doc = NULL;

	/* initialize axl library */
	if (! axl_init ()) {
		printf ("Unable to initialize Axl library\n");
		return -1;
	}

	/* get current doc reference */
	doc = axl_doc_parse_from_file ("large.xml", &error);
	if (doc == NULL) {
		printf ("Unable to parse file, error was: %s\n", axl_error_get (error));
		axl_error_free (error);
		return AXL_FALSE;
	}

	/* release the document */
	axl_doc_free (doc);

	/* cleanup axl library */
	axl_end ();

	return AXL_TRUE;
}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>