How to check if DTD or Doc is loaded ?



Hi everyone,

I am using the c++ Libxml Lib & I want to free DTD & xml loaded ONLY if they are .
Because if I use those functions twice it crash the lib because documents have already been free :

xmlFreeDtd();
xmlFreeDoc();

How to check if a dtd/doc is loaded ?

I tried things as: 
if(dtdPtr->type == XML_DTD_NODE){
std::cout << "free memory now .." << std::endl;
xmlFreeDtd(dtdPtr);
}
But it does not work :s

Thanks by advance for help!!


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