Is there a way that I can convert web pages that display the contents of a search result to an xml file?

For my project (php/html based) the user:
- logs in to their account
- enters their search criteria
- clicks the "Get Results" button.

A php page results page needs to read and display the data in the xml file.
Basically I can figure everything else out except for how to create the initial xml file

Is their a tutorial somewhere on how to do convert search results to an xml file?