error at tinyxml when deserialize
I have the following xml:
<Name />
<Sur> mmm </Sur>
When I deserialize I wrote:
TiXmlElement* section;
section=handle.Firs开发者_如何学GotChild("Name").ToElement()
if (section) {}
The problem is that the if condition is runned though field Name is null
. WHY? Where am I wrong?
Appreciate. THX
Maybe you should define a root element of your XML code, like <Person>
:
<Person>
<Name />
<Sur> mmm <Sur />
</Person>
精彩评论