Xml Is Too Complex

XML is too complex for what it does.

XML does quite a bit, although you might get the wrong impression from listening to your PHB. XML is simply a language for generating markup languages. What's important about it is that the definition (the DTD) is also parsable and shippable.

But in most cases, what we are transporting is fairly obvious anyway. For example, if you feed me some XML which gives me all of your blogs for May, I already know how it's going to look. I just need a table of all your data. I don't need it marked up. If it's going to be marked up, I'd just like a comment column or a database format that has comments. As for being parsable, what exactly are you parsing more of.. data, or comments? Why should the comments even be parsed in the first place?


XML is not a language in the sense of a programming language (building logic.) XML is a set of rules for storing data hierarchically. One can separate content from logic; use the same content with different logic (programming language) or the same logic with different content (not the best example, I know: different languages in a web-application)

And in my opinion: XML-Syntax is more precise, less ambiguous: Where does one bit start, where does it end, how it is structured... -- albin.blaschka "at" sbg.ac.at

It's a good intermediary which has strong support for the import of multiple schemas, which can be used to jury-rig disparate structures together; also, it's good for generic interchange. XML is not the answer everything, as the pundits have promised; that said, I hope you don't bag on SVG for not replacing your fonts or flash, on HTML for not replacing storefronts, and Microsoft for not replacing its insecure code. If you stop listening to marketing and just see XML without the hype, I think you'll be pleasantly surprised.

It's not so much a language in itself - okay, it is a language - but it's a language intended for the specification of other languages using a common set of tokens - languages that (are supposed to) be customized for what is to be said in them.

What is too complex? In summary, XML started out simple, and then caught really nasty FeatureCreep and DesignByCommittee. It's easy to parse.

But hard to validate.

If it's easy to parse, why are most parsing implementations many thousands of lines long? Industrial-strength capabilities are. I don't complaints about implementing the STL.

XML shouldn't be manipulated as XML. In my opinion, the main problem with the way XML must be used today is that tools should make both the syntax and the details of the manipulation of XML invisible, and most tools fail at both tasks. JavaScript DOM tools and a few others seem to get it right or almost right, but most tools for statically typed language, with the exception of CDuce (http://www.cduce.org) and a few "Schema crunchers" seem to get it horribly wrong. The syntax should be invisible as it stops being friendly when you start having to juggle with too many norms & dialects at once. As for the manipulation, DOM does not hide it, it just makes it somewhat uniform across implementations - in Java, this would be the equivalent of manipulating everything only using getClass() and getMethod() rather than actually invoking the appropriate class of the appropriate method. Since most XML is actually/should be somewhat statically typed (structure only if you use a DTDs, structure+content if you use Schemas, other variants exist), it is actually possible to compile that structure into programmer-friendly type-safe data structures. And I believe that's how XML should be used, if you're a programmer in a static language, as I am. DavidTeller
AlternativesToXml

EditText of this page (last edited October 19, 2008) or FindPage with title or text search