The xml file, should really be a php file.. just named .xml
You can set that in your htaccess file with this.
Code:
Options -indexes
<Files xml>
ForceType application/x-httpd-php
</Files>
Then you can do your code, and spit the proper header content-type out. Allowing you to start and stop the needed php in the xml for the nats strings, or anything else code wise you want to do.