How to create a PHP file that returns a list of nodes as XML? How do I create a PHP file that returns a list of nodes as XML when called if I have a menu structure like this:

&lt;GalleryXML&gt;
--gallery 1
---Item 1
---Item 2
---Item 3


And I want a url like localhost/getgallery.php

this url will then return my gallery as xml, something like this

&lt;galleryXML&gt;
    &lt;gallery name="gallery1"&gt;
        &lt;item name="item1"&gt;
            &lt;image&gt;localhost/site/default/image1&lt;/image&gt;
            &lt;imagethumb&gt;localhost/site/default/image1&lt;/imagethumb&gt;
            &lt;url&gt;http://google.com&lt;/url&gt;
            &lt;description&gt;lorum ipsom&lt;/description&gt;
        &lt;/item&gt;
    &lt;/gallery&gt;
&lt;/galleryXML&gt;


Where Image, Imagethumb, url and description are fields on the item node

Thanks in Advance!
This is what i did:


I created a view. 
Changed the style to XML data document (Need to download the Views Datasource module)
Added the fields I needed and Nodequeue
Added a filter to filter by node type so it looks like this:



then I added a new page with a path:



my end result looks like this:

 &lt;node&gt;
    &lt;node&gt;
        &lt;Description&gt;blablalbla&lt;/Description&gt;
        &lt;Image&gt;
        sites/default/files/articles/siteadmin/test.png
        &lt;/Image&gt;
        &lt;ImageBig&gt;sites/default/files/test.png&lt;/ImageBig&gt;
        &lt;Link&gt;derp&lt;/Link&gt;
        &lt;gallery&gt;Gallery1 For flash&lt;/gallery&gt;
    &lt;/node&gt;
    &lt;node&gt;
        &lt;Description&gt;sdfsdfdf&lt;/Description&gt;
        &lt;Image&gt;
        sites/default/files/articles/siteadmin/test.png
        &lt;/Image&gt;
        &lt;ImageBig&gt;sites/default/files/test.png&lt;/ImageBig&gt;
        &lt;Link&gt;sdfdf&lt;/Link&gt;
        &lt;gallery&gt;Gallery2 For flash&lt;/gallery&gt;
    &lt;/node&gt;
&lt;/node&gt;