Well, in order to get it parsed, it needs to go through PHP, not the filesystem.
You could do this in many ways, example 1:
$content = file_get_contents('http://localhost/path/to/xml.php'); // Load it from your webserver.
Example 2 (output buffering):
ob_start();
include('xml.php');
$content = ob_get_contents();
ob_end_clean();
I'd use example 2, although you'll probably have to suppress the errors cause by the header(); (although you can easily code round this by editing the xml.php file.)