John Blackledge: No.. INI files only allow one level of data.. a category, then a list of properties and their values. XML is much better for game purposes and apps that require saving/loading of moderately structured data (INI files are very simple, not easily implimented for levels, AI files, etc.). With an xml file, you can save data like this:
What's nice about BlitzXML is that you can save/load this data easily, without even knowing how XML works. An entity might be a single xmlNode type, with all it's data easily accessible. You don't need to know a thing about what the above XML code means, although it helps if you want to manually edit your xml files.
<!--Test--> <xml> <info> <title>Test World</title> <author>JohnJ</author> <description> This is a test file in XML format used to test the BlitzXML loader/saver library. </description> </info> <world> <entity type="cube"> <position x="3" y="0" z="0"/> <rotation pitch="57" yaw="35" roll="5"/> <color r="0" g="0" b="255"/> </entity> <entity type="sphere"> <position x="-3" y="0" z="0"/> <color r="255" g="0" b="0"/> </entity> <entity type="light"> <position x="-3" y="5" z="2"/> <color r="255" g="255" b="255"/> <source type="point" range="7"/> </entity> <entity type="camera"> <position x="-7" y="-1" z="-4"/> <rotation yaw="-60"/> <bgcolor r="64" g="128" b="255"/> </entity> <entity type="camera"> <position x="0" y="8" z="0"/> <rotation pitch="90"/> <bgcolor r="0" g="255" b="0"/> <viewport x="0" y="400" width="200" height="200"/> </entity> </world> </xml>
What's nice about BlitzXML is that you can save/load this data easily, without even knowing how XML works. An entity might be a single xmlNode type, with all it's data easily accessible. You don't need to know a thing about what the above XML code means, although it helps if you want to manually edit your xml files.