They really serve two different purposes (though there is some similarity). MySQL (or any other RDBMS) provides a powerful, fast, and flexible way to store, organize, manipulate, and retrieve data. While you could theoretically do all this with a XML file and supporting programming code, it will never be as fast as using MySQL to do it. On the other hand, XML provides a means of exchanging data with other applications which then do not need to know anything about MySQL (or any other particular RDBMS), just how to parse XML files.
Thus, the ultimate answer is that you use both: MySQL to store your data on your site, and then in certain situations where you want to exchange that data with other applications, you can retrieve the desired data from the DB and output it as an XML file. (This is what most RSS site feeds are doing, for example.)