XML downside
Moderator: Oberlus
-
- Creative Contributor
- Posts: 314
- Joined: Tue Aug 26, 2003 6:10 pm
- Location: Amidst the Inferno.
XML can be interpreted by the program any number of different ways and I’m not sure exactly how freeorion does it, but most programs I know of use tinyXML which does a very good job. It converts the entire document into a tree of XML elements and portions of that tree can be passed around. So you can have a function like this:
bool loadPlanet(TiXmlElement planetData);
and have a loadSystem function that calls loadPlanet for every planet element, ad nauseam.
bool loadPlanet(TiXmlElement planetData);
and have a loadSystem function that calls loadPlanet for every planet element, ad nauseam.
Time flies like the wind, fruit flies like bananas.