15
void initXML(struct TestData *td) {
19
ctx = xmlinit(&ecode, 0, 0, 0, 0, 0, 0, 0, 0);
22
printf("Failed to initialze XML parser, error %u\n", (unsigned) ecode);
27
void initXML_Validation(struct TestData *td) {
29
scctx=schemaInitialize(ctx,&ecode);
31
printf("Failed to initialze Schema Validator, error %u\n", (unsigned) ecode);
35
ecode=schemaLoad(scctx,td->scfn,NULL,&xsddoc);
37
printf("Failed to parse xsd file, error %u\n", (unsigned) ecode);
41
void releaseXML(struct TestData *td) {
42
schemaTerminate(scctx);
47
void parseXML(struct TestData *td, unsigned long iter) {
50
ecode=xmlparsebuf(ctx,td->xml,td->xmllen,0,XML_FLAG_DISCARD_WHITESPACE);
52
printf("Failed to parse XML file, error %u\n", (unsigned) ecode);
55
node=getDocumentElement(ctx);
58
void validateXML(struct TestData *td, unsigned long iter) {
62
ecode=schemaValidate(scctx,node,NULL);
64
printf("Validating of XML file failed, error %u\n", (unsigned) ecode);
69
printBuffer(mem,memsize,node,0,0);
76
int main(int argc, char *argv[]) {
77
return Test(argc,argv);