Demonstrates basic non-MCE XML read access.
#include <stdio.h>
#include <time.h>
#ifdef WIN32
#include <crtdbg.h>
#endif
xmlChar *ln=xmlTextReaderLocalName(reader->
reader);
printf("<%s>\n", ln);
printf("</%s>\n", ln);
xmlFree(ln);
}
int main( int argc, const char* argv[] )
{
#ifdef WIN32
_CrtSetDbgFlag (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif
time_t start_time=time(NULL);
} else {
printf("ERROR: part \"%s\" could not be opened in \"%s\" for XML reading.\n", argv[2], argv[1]);
}
} else {
printf("ERROR: file \"%s\" could not be opened.\n", argv[1]);
}
} else if (2==argc) {
printf("ERROR: initialization of libopc failed.\n");
} else {
printf("opc_extract FILENAME.\n\n");
printf("Sample: opc_extract test.docx word/document.xml\n");
}
time_t end_time=time(NULL);
fprintf(stderr, "time %.2lfsec\n", difftime(end_time, start_time));
#ifdef WIN32
#endif
return 0;
}