[xml] Getting error messages from xmlReader?



Hi,

Firstly I'd like to say a big thankyou for this library! When my boss
asked me to write this app I am working on to process XML in C, I
thought "oh no!" but glib and libXML are making it really easy. So
thanks for that.

Now my question: I have checked the archives but could not see any way
to get an error message when an xmlReader function fails. The
xmlNewTextReaderFilename function is returning NULL and I am sure I am
giving it a correct file name (i have tried with file:/// in front as
well, as the docs say it needs a URI). 

It seems I have to set an error handler manually? This wouldn't seem
very intuitive to me, as you lose context somewhat. It'd be nicer if
there was just a xmlReaderGetLastError() function which returned an
error structure for instance. Alternatively a GError style API would be
nice too.

Oh, that reminds me, is there a reason libxml doesn't use glib? Is it
just a matter of timing for that library or did you want to keep a glib
dependancy out for political/size reasons....

Many thanks for your hard work -mike

-- 
Mike Hearn <m hearn signal qinetiq com>




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