You'll need to read the xml data in from the file to a variable before running the example that I posted earlier.
Reading in the data is quite straight forward and i explained how to do it here on this thread:
http://www.sqlservercentral.com/Forums/Topic1451237-21-1.aspx