I don't think it's fair to call XML a failure any more than you can call Perl a failure. XML does the job, and it's still used in a lot of places. It's just that it's being supplanted by a newer technology that is superior for the majority of use-cases.
XML is being abandoned as the medium for a variety of APIs at the moment (Google and Facebook especially). It looks like failure when my XSLT code deprecated before I can even release it.
umm do you mean "superior" in regards to capabilities or regards to simplicity. You could just as well argue that JSON replacing XML is akin to XML replacing SGML.