Demonstrates how to dump a part from an OPC container. Ussage opc_dump [container] [part-name]. E.g. opc_dump sample.docx "word/document.xml".
#include <stdio.h>
#include <time.h>
#ifdef WIN32
#include <crtdbg.h>
#endif
int main( int argc, const char* argv[] )
{
#ifdef WIN32
_CrtSetDbgFlag (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif
if (NULL!=c) {
opc_bool_t is_xml=NULL!=type && type_len>=3 &&
'x'==type[type_len-3] &&
'm'==type[type_len-2] &&
'l'==type[type_len-1];
fprintf(stderr, "type=%s is_xml=%i\n", type, is_xml);
if (is_xml) {
xmlTextWriterSetIndent(writer, 1);
if (NULL!=writer) {
}
xmlFreeTextWriter(writer);
}
} else {
if (NULL!=stream) {
}
}
}
}
}
#ifdef WIN32
#endif
return 0;
}