Hi Valle,
you might want to read the following article http://www.sqlservercentral.com/articles/SS2K5+-+XML/2982/.
If you have further questions please provide sample data as described in the link in my signature. Please use [ code="xml" ] tag (with removed spaces) for xml sample data.