Wednesday, May 26, 2010

The Myth of an XML being bigger

I suspect the use of that line of thought comes from the fact that that's what properties and xmls are used in practice. Naturally properties are used for configuration entries and xmls used for structural/more hierarchical data.

But if one was to use a property file to emulate structural data:

first.second.third.word=I
first.second.third.prep=am
first.second.third.verb=beating
first.second.third.object=you
first.second.third.over=!

it would take up more space than (after the 4th line) :

[first][second][third][word]I[/word][prep]am[/prep][verb]beating[/verb][object]you[/object][over]![/over][/third][/second][/first]

And if the data grows, it's competitive for more space. Stick w. xmls for hierarchical-oriented data even if there's no duplicating namespaces. Given the complexity already, there's a good chance it may go that way.

No comments:

Post a Comment