Fast forward 3 years, I'm now taking the project out of mothballs, and decided to make it everything that it deserved to be.
One of the things I always wanted to do was use XML for the data storage. When I decided to use .NET, I had an epiphany... .NET has XML classes built in; this should be a snap!
20 failed snaps later, I'm thinking of throwing out the whole idea.
XML seems like a poor substitute for what I need. Even more, I feel like I tried using a torque wrench to pound a nail.
Does XML offer me what I need? Of course.
Do I have to fight with it and use it in strange, twisted, unnatural ways? Yeah.
Is XML the solution I want? I don't know.
For example; For the bloody life of me, I can't figure out what the hell the point of XML attributes are, except for uneccessarily ambiguating the language (is ambiguating a word?).
I see examples all over the internet like this:
Now what I don't get is how this is legal, and yet this, is also perfectly legal:
Or any of 100 other permutations. It seems to me that there are 500,000 different ways to represent a complex object in XML... so which way is the right way?
At the moment, I'm using XML like this:
<long name="id" value="46575"/>
"name" value="Big Room"/>
<long name="region" value="047"/>
<float name="databank var 1" value="3.14159"/>
Right. That's retarded. How about this?
"string" name="name">Big Room
"float" name="databank var 1">3.14159
This seems to be more along the lines of what XML designers like to use... but it's bigger, and I don't like the arbitrariness of treating types, names, and content as attributes and content. Argh.
* "XML is a giant step in no direction at all" -- Erik Naggum
* "Some people, when confronted with a problem, think 'I know, I'll use XML.' Now they have two problems." -- dirtsimple.org
* "XML is like violence - if it isn't working properly, you aren't using enough of it." -- Anon