OpenXML's @mp:id Meta-property
Inserting hierarchical data from an XML document into relational tables that have primary key/foreign key relationships can be difficult. Read on to see how you can use OpenXML's @mp:id meta-property to overcome the challenge.
http://www.windowsitpro.com/SQLServer/Article/ArticleID/27473/27473.html