[xml] xmlValidityErrorFunc how-to?



Hi all,
can you advise me where to find some description about xmlValidityErrorFunc?
There is ValidCtxt->warning = (xmlValidityErrorFunc) fprintf; in the xmllint.c
but I need to call my own function if warning or error is occured.

In documentation is only that the prototype of xmlValidityErrorFunc is
(*xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...);
I can obtain error message in char* format, but I need validation context,
because I need to know in whitch element the error was occured.

So if I wrote the follow function it doesn't work:

void test(xmlValidCtxtPtr ctx, const char *msg, void *el){
  cout << ctx->node->name;
}

Can you advise me?

Thanks

-petrn
-- 

Petr Novak, Liberouter Project (www.liberouter.org)
E-mail: novak merlot ics muni cz




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]