For example, this is frowned upon:
"100" direction="1" name="The first level">
"10" y="54" id="Enemy001">
while this seems okay:
The first level
While there's nothing stopping you from reading in the second example in with TinyXml, there's no mechanism included for searching for and converting the text nodes like those that exist for attributes. So, I set out to write it.
I could have (and may still) modify TinyXml's source to include the features I desire. For now, however, I've written a seperate utility-function module.
Specifically, see the functions named FirstChildText, and NextSiblingText. I tried to follow the mechanisms built into TinyXml.
Each class that I want xml access for just needs to be smart enough to read and write itself to a TiXmlElement. Here's the code that loads and writes back out the second xml example above. (From xmltest.cpp)
std::cout << "Couldn't read input file: test.xml\n";
std::cout << "Couldn't read level\n";
xmlElement = level.WriteXmlElement();
std::cout << "Couldn't write output file: testoutput.xml\n";