title: How to add namespaces to root node in SQL Server 2005 using XML FOR PATH
body: <p>I've created Select...FOR XML PATH statement using SQL Server 2005 and need to add several namespaces and schema reference to the root node. </p>
  
  <pre><code>xsi:schemaLocation="http://somewhere/v1/ schemaname.xsd"
  xmlns="http://somewhere/v1/"
  xmlns:lom="http://somewhere/lom/v1/"
  xmlns:a="http://somewhere/a/v1/"
  xmlns:cf="http://somewhere/cf/v1/"
  xmlns:co="http://somewhere/co/v1/"
  xmlns:hx="http://somewhere/hx/v1/" 
  xmlns:m="http://somewhere/m/v1/" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  </code></pre>
  
  <p>Any pointers would be greatly appreciated.</p>
  
  <p>Thanks.</p>