What does TiXmlHandle.Child(const char * value, int index) return if there is no child? Is it null?
use the source Luke ;)
TiXmlHandle TiXmlHandle::Child(...) const { // *pseudocode* if (child) return TiXmlHandle( child ); else return TiXmlHandle( 0 ); }
so you'll always get a valid TiXmlHandle, allowing you to do handle1.child().child().child() even if the first child() call returned TiXmlHandle(0).
Log in to post a comment.
What does TiXmlHandle.Child(const char * value, int index) return if there is no child? Is it null?
use the source Luke ;)
TiXmlHandle TiXmlHandle::Child(...) const
{
// *pseudocode*
if (child)
return TiXmlHandle( child );
else
return TiXmlHandle( 0 );
}
so you'll always get a valid TiXmlHandle, allowing you to do handle1.child().child().child() even if the first child() call returned TiXmlHandle(0).