123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #include <stdio.h>
- #include <libxml/parser.h>
- #include <libxml/tree.h>
- static const char *document = "<doc/>";
- static void
- example3Func(const char *content, int length) {
- xmlDocPtr doc;
-
- doc = xmlReadMemory(content, length, "noname.xml", NULL, 0);
- if (doc == NULL) {
- fprintf(stderr, "Failed to parse document\n");
- return;
- }
- xmlFreeDoc(doc);
- }
- int main(void) {
-
- LIBXML_TEST_VERSION
- example3Func(document, 6);
-
- xmlCleanupParser();
-
- xmlMemoryDump();
- return(0);
- }
|