[xml] how to catch error messages in xmlParseDoc



Hello again ;)

When you use the function xmlParseDoc, if the document is not valid it
returns
messages to stderr like:
"Entity line 3: error: Opening and ending tag mismatch: applicaton and
application"

I'd like to catch that kind of messages and put them into a char*

I tried in adding in my function:

xmlValidCtxt  cvp;
char          *validError;

cvp.userData = validError;
cvp.error    = (xmlValidityErrorFunc) sprintf;
cvp.warning  = (xmlValidityWarningFunc) sprintf;


but I dont know how to bind it with xmlParseDoc...

Can you help me?
thanx a lot
--
Mansuy DEJEAN <mdejean prosodie com>
Développement & Intégration - Boulogne
Prosodie <http://www.prosodie.com>
Tel: 01.46.84.16.78



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