mirror of https://github.com/AxioDL/tinyxml2.git
handles work
This commit is contained in:
parent
00770d2855
commit
db0bbb60a1
|
@ -1169,8 +1169,8 @@ private:
|
||||||
and correct to use:
|
and correct to use:
|
||||||
|
|
||||||
@verbatim
|
@verbatim
|
||||||
TiXmlHandle docHandle( &document );
|
XMLHandle docHandle( &document );
|
||||||
TiXmlElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", 1 ).ToElement();
|
XMLElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).FirstChild().NextSibling().ToElement();
|
||||||
if ( child2 )
|
if ( child2 )
|
||||||
{
|
{
|
||||||
// do something useful
|
// do something useful
|
||||||
|
|
|
@ -736,8 +736,8 @@ int main( int /*argc*/, const char ** /*argv*/ )
|
||||||
XMLElement* ele = XMLHandle( doc ).FirstChildElement( "element" ).FirstChild().ToElement();
|
XMLElement* ele = XMLHandle( doc ).FirstChildElement( "element" ).FirstChild().ToElement();
|
||||||
XMLTest( "Handle, success, mutable", ele->Value(), "sub" );
|
XMLTest( "Handle, success, mutable", ele->Value(), "sub" );
|
||||||
|
|
||||||
// ele = XMLHandle( docC ).FirstChildElement( "element" ).FirstChild().ToElement();
|
const XMLElement* eleC = XMLHandle( docC ).FirstChildElement( "element" ).FirstChild().ToElement();
|
||||||
// XMLTest( "Handle, success, mutable", ele->Value(), "sub" );
|
XMLTest( "Handle, success, mutable", ele->Value(), "sub" );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue