mystring.c had a little (non-)error.
[xmlparser.git] / main.c
blob1e9bdb7054febc94fce44094f9607d32facea448
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include "xmlparser.h"
4 #include "myarray.h"
6 int main(int argc, char **argv) {
7 if (argc != 2) {
8 printf("I need _one_, exactly _one_ XML file as input!\n");
9 exit(EXIT_FAILURE);
12 printf("Pause...(right before parsing)\n");
13 getchar();
14 XmlTag tag = xml_parse(argv[1]);
15 if (tag == NULL) {
16 printf("An error occurred during parsing. Exiting now...\n");
17 exit(EXIT_FAILURE);
20 printf("Pause...(right after parsing, and right before printing the tree)\n");
21 getchar();
22 xml_tree_print(tag);
23 printf("Pause...(right after parsing, and right before freeing the tree)\n");
24 getchar();
25 xml_tree_free(tag);
26 printf("Pause...(right after freeing the tree)\n");
27 getchar();
29 return 0;