Strange. I would have thought that there was a text element, having an emty string value.
Also, the strange thing is that you usually did use a "theElement->LinkEndChild(new TiXmlText(someString))" to generate the XML, so one would expect a text element back when reading back the file, no? Are there specific reasons why this is not so?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If there is a Element as bellow:
<element name="style"></element>
what will happen when I call the method Element.GetText()?
It should return null, because the element does not have a child text node.
lee
Strange. I would have thought that there was a text element, having an emty string value.
Also, the strange thing is that you usually did use a "theElement->LinkEndChild(new TiXmlText(someString))" to generate the XML, so one would expect a text element back when reading back the file, no? Are there specific reasons why this is not so?
Koen --
This XML:
<element name="style"></element>
has no child Text node. Assuming GetText is called on the element above, there is simply nothing to return.
lee
just curious, how would this line be effected with that:
<Property Name="seconds" secs="02"/>
would it return ' 02 '
...it still has no text element. :)
It does have the attribute "secs" with the value "02".
lee