diff --git a/tinyxml2.h b/tinyxml2.h index a5d145b..266efc7 100755 --- a/tinyxml2.h +++ b/tinyxml2.h @@ -1766,7 +1766,7 @@ private: @verbatim XMLHandle docHandle( &document ); - XMLElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).FirstChild().NextSibling().ToElement(); + XMLElement* child2 = docHandle.FirstChildElement( "Document" ).FirstChildElement( "Element" ).FirstChildElement().NextSiblingElement(); if ( child2 ) { // do something useful