XML

I once heard someone claim that XML has the efficiency of a plain text file combined with the readability of a binary. Every time I have to type XML by hand, I tend to agree! XSLT for instance seems nice… until you actually have to program and maintain logic/functionality encoded in it for a while: it is verbose, it forces you to express constructs in hierarchical XML structures and it becomes a bit frustrating….

XML is great for tools and communication between programs, but it’s verboseness and forced hierarchical structure makes most XML documents not as readable as promised. The problem I observe is caused by the accidental complexity (the difference between intention and result) inherent to the language. You have to close each tag (type it twice), parameters are passed by attributes or subnodes (a lot of text) and there’s only hierarchical structures instead of more shortly expressed ways. There’s a lot ‘ceremony’ to express simple intent.

Therefore, I’d advice people to use XML for it’s strong points, but not overestimate it’s power for purposes it’s just not intended for. For many purposes I’d rather create an (e.g. oaw-based) Domain Specific language that let’s me express more things more easily and gives me context support in my favorite editor while doing so.

Leave a Reply