This problem is specific to TinyXML++. The problem is that the
TinyXML copy-and-paste demo program from the tutorial fails during
execution when TIXML_USE_TICPP is defined.
http://www.grinninglizard.com/tinyxmldocs/tutorial0.html
It is my understanding that TinyXML++ is a wrapper and that programs
using tinyXML, but not the TinyXML++ features, should execute whether
TIXML_USE_TICPP is defined or not. Maybe my understanding of what is
meant by wrapper function in this case is incorrect?
I tried using both the GCC and intel compilers and got the same
problem. As noted above the installation is correct and the
xmltest.cpp program completes without errors.
In the tutorial example routine:
int dump_attribs_to_stdout(TiXmlElement* pElement, unsigned int
indent)
{
if ( !pElement ) return 0;
TiXmlAttribute* pAttrib=pElement->FirstAttribute();
Returns a bad value for the pointer to the attributes.
The cause of this problem is in tinyxml.h
TiXmlAttribute* First() { return ( sentinel.next ==
&sentinel ) ? 0 : sentinel.next; }
Where sentinel.next is junk, causing the program to behave as if there
is an attribute when there is not. The subsequent attempt to print
the attribute fails as described in my first post.
When the definition of TIXML_USE_TICPP is removed the program
correctly determines that there are no attributes.