Comment Re:Old tech, and limited (Score 3) 300
TeX has control elements for describing structure, since structure is a key part of typesetting. Since these elements are macros, they're programmable, although not truly abstract as in XML. About the only thing I can think of that XML can do for document structure that TeX cannot is out-of-order elements, and I'd argue that out-of-order is incompatible with structure.
In database terminology, XML is a key-data pair system. The data can be anywhere in the XML file and you need some sort of key to know where it is and/or when you've found it. (Since XML is not organized, you can't do random access to get at the key. You have to load it in and organize it, in which case it isn't XML, or you have to sequentially search it.)
TeX is a semi-sequential structure, with relationship links between specialized data tables. Again in database terms, it's a set of batch sequential files with crude but useful support for concrete data association. Because it's batch sequential, real-time usage gets hairy. Big deal. Those in the middle of writing should be concerned with the writing. It would be nice if editors had better error-detection, but it's not usually that critical.