Picture gallery array and XML. Help please

Hi,
I do have a code for a picture gallery and I like to use this code. The only thing is that the names of the pictures and their thumbnailes have to be written manually in an array in the code (image array and thumbnail array).
How can I first populate these two arrays from an XML file to not write manually? I ma not so good in XML so please explain more briefly.
Any help / tutorials / examples?
Thanks.