Kirk Evans Blog

.NET From a Markup Perspective

A Context for XML Complexity?

Don writes that XML in its entirety had become more complex than COM ever was. 

I disagree with this statement on its face.

I agree that there is a huge family of specifications surrounding XML, but each specification is just built upon the XML foundation.  If the intent of the post intends to point out that XML eclipses COM for complexity by sheer volume of implementations, then consider the lack of a standards body for COM implementations.  If there were such a thing, maybe it can be represented by opening a new Visual Basic 6 project on a default installation of Windows XP and going to the Add References tab.

Reading between the lines, I think Don is saying that there is a core of XML technologies, his “kernel” list, that XML developers need to know, and that “kernel” is somehow more comprehensive than COM’s.  I don’t think comprehensiveness necessarily equates to complexity.  However, the W3C has never been known to make the specs overly readable with a clear understanding of their target audience.

XML is just data. XML at its own core is just XML 1.0, which lays out the base rules for the representation of a document. The surrounding specs for XML, including SOAP, XML namespaces, and XML Schemas, just makes XML more functional. They are further implementations of XML.  If you know the  basics of XML, the rest is just learning the individual specification that you are adopting.

You can absolutely use XML without XML Schemas or SOAP, considering the number of DTD validations still performed daily.  XML Schemas and namespaces are a great addition to the XML landscape, but they are just further implementations of a core concept.  The only real requirement for XML is that you support the well-formedness rules for XML 1.0.

I agree more with Dare’s evaluation of the “Core XML Technologies That Matter“.  Dare points out Don Smith’s interpretation of XML’s complexity, which sums up my view even more closely.  Just drop XSLT from the mix, and the core that you really have to understand to work with in XML is:

The comment thread on Dare’s post indicates that only Part 2 should be considered, but Part 0 serves as a road map to parts 1 and 2 and provides a topical overview that is enough for 80% to get by… the other 20% will consider both Parts 1 and 2.

To boil it down even further, you really don’t need to know XML 1.0 in depth, just like you don’t need to know HTML in depth. You just need to know the basics enough to work with a DOM model.