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 (13 years, 3 months ago) by misho
Branches: axl, MAIN
CVS tags: HEAD, AXL0_6_7, AXL0_6_1
3th party - XML

    1: #include <axl.h>
    2: #include <stdio.h>
    3: 
    4: int main (int argc, char ** argv)
    5: {
    6: 	axlError * error = NULL;
    7: 
    8: 	/* top level definitions */
    9: 	axlDoc * doc = NULL;
   10: 
   11: 	/* initialize axl library */
   12: 	if (! axl_init ()) {
   13: 		printf ("Unable to initialize Axl library\n");
   14: 		return -1;
   15: 	}
   16: 
   17: 	/* get current doc reference */
   18: 	doc = axl_doc_parse_from_file ("large.xml", &error);
   19: 	if (doc == NULL) {
   20: 		printf ("Unable to parse file, error was: %s\n", axl_error_get (error));
   21: 		axl_error_free (error);
   22: 		return AXL_FALSE;
   23: 	}
   24: 
   25: 	/* release the document */
   26: 	axl_doc_free (doc);
   27: 
   28: 	/* cleanup axl library */
   29: 	axl_end ();
   30: 
   31: 	return AXL_TRUE;
   32: }

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