Here are some examples from my own recent development endeavors - I'm using XML with PHP for a couple of different purposes.
- First, I developed a content management system for a fairly involved web application. I broke a lot of things out into a config file, but it kept growing and growing with things that were less and less configuration specific, and more and more content specific. I finally bit the bullet and broke everything that wasn't truly a configuration out into XML files, and parsethem into my site. That way, I only have to manage section titles, links, some content, etc., etc. from one centralized location. I really like this solution, it beats anything I had before, and is very easy to maintain. I even made a web form to create my XML files. For some instances, I use the XML file instead of my database, so I don't have to do multiple database lookups on every page just to build a nav, for example. I still store the main content in my db, but only look it up on the article page itself. I'm even able to create my XML from the database.
- Second, I started promoting my site on other places throughout the web, and found several instances where my headlines and links could be parsed by third parties if it was contained in XML. I now keep a separate XML file for other sites to parse.
- Third (this is part of a separate site, actually), I've worked out a solution with an affiliate site where we can exchange content. We've decided to use XML for this solution, so that neither of our applications has to care about what the affiliate's software does, and we don't have to allow db access. All we have to do is agree on the format of the XML file. This also gives me the flexibility to change my architecture at any time w/o affecting my affiliates.
I hope this example helps illustrate where XML can be useful as part of a PHP solution. Please feel free to post any further questions!