开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜