How does it work?

How can I get for example a search query from flash(sended with sendandloadvars?) to php which searches the database. Then generate a XML file with the result, and load the file back in flash.

I often use sendandloadvars but now I’ve to get my php results XML file in flash!

Hints?