Anonymous - 2003-11-13

Case as below

//assume that in current directory
//you have file "TestCase.xml"
//and you do not have file "TestCase123.xml"
//...

TiXmlDocument * xmlDoc = new TiXmlDocument();

//load inexistent file, method return false --> ok!
xmlDoc->LoadFile("TestCase123.xml");

//bug here
//load existent file, method also return false -->???
xmlDoc->LoadFile("TestCase.xml");

...
----------------------------------------------
I have found that in LoadFile method, there's no code to reset error flag. When I insert line to do it, it seems okay.

//file "tinyxml.cpp"
bool TiXmlDocument::LoadFile( const char* filename )
{
    // Delete the existing data:
    Clear();
    ClearError(); //clear error flag
...

Good luck,
Bye.