Back to index

im-sdk  12.3.91
parsertest.c
Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <EIMIL.h>
00004 
00005 int main(int argc, char **argv)
00006 {
00007     char buf[1024];
00008     unsigned char *pfn;
00009     EIMIL_handle eh, eh2;
00010 
00011     getcwd(buf, sizeof(buf));
00012 
00013     EIMIL_initialize();
00014 
00015     /* test1: register class */
00016     EIMIL_register_class("org.OpenI18N.test", buf);
00017     pfn = EIMIL_find_file("org.OpenI18N.test", "parser-test1.xml");
00018 
00019     if (!EIMIL_parse_file(&eh, pfn)) {
00020        EIMIL_get_errormsg(eh, &pfn);
00021        fprintf(stderr, "%s\n", pfn);
00022     }
00023     EIMIL_send_event(eh, NULL);
00024 
00025     EIMIL_duplicate_handle(&eh2, eh);
00026 
00027     return 0;
00028 }
00029