1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #include <stdio.h>
- #include <libxml/parser.h>
- #include <libxml/tree.h>
- static void
- example1Func(const char *filename) {
- xmlDocPtr doc;
- doc = xmlReadFile(filename, NULL, 0);
- if (doc == NULL) {
- fprintf(stderr, "Failed to parse %s\n", filename);
- return;
- }
- xmlFreeDoc(doc);
- }
- int main(int argc, char **argv) {
- if (argc != 2)
- return(1);
-
- LIBXML_TEST_VERSION
- example1Func(argv[1]);
-
- xmlCleanupParser();
-
- xmlMemoryDump();
- return(0);
- }
|