Despite many developers using it as such,
XML is NOT a database technology, it can be used to store textual information but it has no referential integrity etc:
http://xml.silmaril.ie/basics/whatfor/[
^] and
http://weblogs.asp.net/sbchatterjee/archive/2003/11/22/39257.aspx[
^]
XML is a poor choice for your problem, it is aimed at text storage. A plain old SQL database will store images, you have the benefits of backup and it will maintain references between the pictures and any other related tables, assuming you set the database up correctly.Setting up your DB will save you the world of pain in orphaned records, repeated data changes etc:
http://www.felgall.com/mysqlnorm.htm[
^]. I hope this helps!