[Expat-discuss] Reading DTDs

bartelsl at bellsouth.net bartelsl at bellsouth.net
Sun Jul 27 18:21:25 EDT 2003


Hello all,

    I'm working on some code that creates binary encodings of XML data.  I don't really need any validation as such but I need element and attribute lists to be parsed.  I just started working with expat and I've made a few modifications to the elements.c example that work correctly.  I thought that I could get the results I wanted by doing something like the following:

static void DTDElements(void *userData, const XML_Char *name, XML_Content *model) {

    printf("Element Name: %s\n", model->name);

    puts(name);

    printf("Number of Children: %d\n", model->numchildren);

}

and then in main:

XML_SetElementDeclHandler(parser, DTDElements);

problem is that now the program does absolutely nothing.  Do errors are generated.  The program ends and it doesn't look like any events are generated.

Any ideas?

Thanks,

Brent






More information about the Expat-discuss mailing list