Published: Jul 15 2008 / 05:51
I don't like XML !
That's your problem. Work on it.
why should I work on it, when nicer alternatives exist?
Me neither !
Well. Keeping in mind that XML = eXtensible *Markup* Language...
1. Character encoding
If you can edit your file in encoding needed, without broken characters, then you can save it right and definitely can claim appropriate encoding for it. If not, then it's editor problem and you should stay in ASCII boundaries.
Don't overuse CDATA blocks.
2. Embedding binary data
If we can name Base64 method a problem, then I agree with you. For me though it's a simple and fast solution to the problem of storing binary data in XML.
3. Indentation characters mixed with data
"They often have no meaning in the XML data itself." Exactly, and parsing XML file more often than not ignore'em. Then, XML can be viewed in plain text more or less readable, but if you propose some binary format, you'll definitely need a program to display it nicely and just read it somehow.
4. Textual representation of numeric data
Can't disagree, but again, I'm not worrying about file's size, but about numeric and date formats which are, may be, redundant.
5. Unnecessarily verbose
"If data is not hierarchically structured, consider using another less verbose format such a CSV." Exactly. Use XML when it's worth it, and plain flow format otherwise.
6. Human un-readability
Relates to point 3. XML can be indented or compressed. Format specification that mandates to indent hierarchical data will force you to produce larger file which confronts with point 5.
7. A single XML root element
See point 5.
8. SOAP - Oh My God!
And in the end, offer an alternative to XML. I know of two: JSON (mostly with all "problems" above) and Binary XML approach (http://en.wikipedia.org/wiki/Binary_XML).
cheers for the long review! I'll read the wiki page and probably link to it if its any good.
I see 16 reasons why Jakob Jenkov and Kasper Graversen suck!
would have been more clever if you wrote "8 reasons", atleast then it would match the number of points
haha, nice one Motion Control ... my dad beats your dad...
I've actually argued why I don't think XML is a nice solution. Seriously, in most cases where I have seen XML applied I can think of better alternatives. XML is more like the lowest common denominator than a case of one-solution-solves-all. More of a one-solution-bothers-all.
XML is okay, but JSON is better IMHO.
Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.