My views of using XML swing back and forth.
Pros:
-Plenty of basic text editors will make it easy for you \ artist\ designer to work with the data.
-You can store tree''s
-Data is clear and be generated by hand. Early on this is a major advantage over a binary format.
-Binary data types are more likely to be static struct''s laid out on disk. This means that if you update your code to accept some new data you might need to update all your existing data. XML would allow you to add new attributes etc without affecting older data. An example, I''m using xml to store my models, they will use triangle lists(arrays, buffers etc), later however I''d like to add index''s that are stipified without converting all my data.
Cons:
-All the implementations I''ve found are bloated and are much larger than my actual application.
-Size makes you think twice about transferring it across a network without some tricky preprocessing.
Someone touched on the issue of compression. Originally I thought that as all data is pretty much text this would be quite simple to make it efficient. No so. I came up with an idea however. An XML document is a set of tags, normally used repeatily. A standard huffman compressor wont be smart enough to realise that you''ve used the tag "Light" 300 times in a file. Create a hash tabe at the beginning of the file and replace the tags. This will give an intermediate file prime for transmission and also much more friendly towards huffman compression.
I''m currently on the side of XML. I am however going to write a basic parser myself, I could probably do this in 2-3k of source rather than adding 700k binary to my project (This is important to me as I work in 2 locations).
Chris
XML as opposed to text files...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement