6
#define DTD_VALIDATION_SUPPORTED
9
int startDocument(void *ctx) {
12
int endDocument(void *ctx) {
15
int startElement(void *ctx, const oratext *name, const struct xmlnodes *attrs) {
18
int endElement(void *ctx, const oratext *name) {
21
int characters(void *ctx, const oratext *ch, size_t len) {
35
void initXML(struct TestData *td) {
37
ctx = xmlinit(&ecode, 0, 0, 0, &saxcb, 0, 0, 0, 0);
40
fprintf(stderr,"Failed to initialze XML parser, error %u\n", (unsigned) ecode);
45
void releaseXML(struct TestData *td) {
49
void parseXML(struct TestData *td, unsigned long iter) {
53
ecode=xmlparsebuf(ctx,td->xml,td->xmllen,0,XML_FLAG_DISCARD_WHITESPACE|XML_FLAG_VALIDATE);
55
ecode=xmlparsebuf(ctx,td->xml,td->xmllen,0,XML_FLAG_DISCARD_WHITESPACE);
58
fprintf(stderr,"Failed to parse XML file, error %u\n", (unsigned) ecode);
64
ctx = xmlinit(&ecode, 0, 0, 0, &saxcb, 0, 0, 0, 0);
68
int main(int argc, char *argv[]) {
69
return Test(argc,argv);