//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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.