Hola:
Simplemente pon eso con heredoc y la cabecera xml...
<?
header("Content-type: text/xml");
echo <<< heredoc
<?xml version="1.0" encoding="UTF-8"?>
<gallery>
<album lgPath="images/" tnPath="thumb/">
<img src="1.jpg" title="" caption="" />
<img src="1.jpg" title="" caption=""/>
<img src="1.jpg" title="" caption="" />
<img src="1.jpg" title="" caption="" />
<img src="1.jpg" title="" caption="" />
</album>
</gallery>
heredoc;
?>
Saludos