As I read Extensible Programming for the 21st Century, I pondered the secret of success of XML. In a way, I am already using XML software (glade, the GUI editing tool, saves the edited GUI description in a XML file, which can later be read by a Python library and used to construct the GUI for a script).
After all, it can be considered to be just another syntactic representation of LISP or Scheme. For example, the transformation between
(+ 1 2)
and
<paren> <token name="+"/> <token name="1"/> <token name="2"/> </paren>
is trivial.
My guess is that XML succeeds because it allows the developer to add types to S expressions and to constrain them and their contents. This is like imposing hard-typedness on variables and/or their values in a conventional programming language. XML works because the developer can give different names to his expressions besides the equivalent of naming every tag <paren>.
As a proof of concept, it may be a good idea to develop a XML representation of a script in a popular scripting language (such as Python), along with code for transforming the script between its language and the language’s XML representation.