Well you can have PHP go to a remote server, open up a stream and read the XML content and manipulate it as you see fit. If you want to then insert the XML content straight into a database, you can do that too. Just create a TEXT or NTEXT field type in your database and put it in there with a SQL insert. Don't make it more complicated than it has to be.
Look into SimpleXML which is enabled by default in PHP 5. With the simplexml_load_file() function you can pull in XML files from remote sites and parse them with the simplexml functions. Or you can use libxml which is also installed as part of the PHP core. These libraries will let you grab xml content, parse it into a string which you can then insert into a TEXT or NTEXT field that is big enough to store the content.
Then all your SQL has to do is read it from the database. Not that tricky really. Look into both those libraries and I am sure you will see how you can pull in the resource, parse it quickly and create a string that you can insert into your database for future use.
You could also suck the xml across using the function file_get_contents() and store it in raw form directly into the database. Mind you this way may not get all the XML tags so some content may be lost along the way, but depending on the XML it may be a solution.
Personally I would pull across the xml doc with simplexml_load_file and here is an example of using a DIC feed, sucking it across with simplexml_load_file and then accessing the first new topic...
php
<?php
// Load the feed for the Caffiene Lounge's newest topics from DIC site
$filecontent = simplexml_load_file("http://www.dreamincode.net/rss/forums.php?forum=1");
if ($filecontent != null) {
// Get the title of the first new topic post
echo "Caffiene Lounge first title: " . $filecontent->channel->item[0]->title;
}
else { echo "Couldn't fetch the content"; }
?>
Enjoy!
"At DIC we be xml sucking code ninjas... that and we just plain suck!"