Re: [xml] Uuugly warnings - repost



I'm sorry if I persist but I have no good answer to this question. I've looked through the code, I've read the docs, I have no idea why this does not work or the correct way to make this work.

An RTFM pointer would be fine.

My objective is to remove all output from the xml library. In this case, the non-existance of the file being parsed is not considered an error yet the `warning: failed to load external entity "system_config.xml"' warning persists. It seems as though the xmlParseFile API is inadequate for this. What would be more appropriate ?

TIA.

- original post....

So, I get the following output when I try to open a file using xmlParseFile.

warning: failed to load external entity "system_config.xml"

This is the code chunk

warningSAXFunc        l_warning = xmlDefaultSAXHandler.warning;
errorSAXFunc          l_error = xmlDefaultSAXHandler.error;

xmlDefaultSAXHandler.error = 0;
xmlDefaultSAXHandler.warning = 0;

doc = xmlParseFile(_filename.c_str());

xmlDefaultSAXHandler.error = l_error;
xmlDefaultSAXHandler.warning = l_warning;

So what's the Right(TM) way to send all warnings/errors to the bit bucket ?

G






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