Related link: http://norman.walsh.name/2003/06/01/xmlnotoo
Norm Walsh provides yet another excellent perspective on the differences between XML and objects.
Norm describes himself as “an object oriented kinda guy”, and he also knows markup very very well, having led the DocBook effort for years, not to mention his participation in the XML and XSL activities. He’s got a clear perspective on where things do and don’t fit.
The only thing I can think to add is that XML is pretty explicitly a rejection of an aspect of OO practice that Norm touches on only briefly: encapsulation. Everything accessible all the time is pretty clearly a hallmark of XML work. You can hide things if you want to, but it takes a lot more effort.
Why can’t objects, tables, and markup all be the same?