As promised, the sample code for my presentation.  The Object Demo was from Andy Conrad's article “Death, Taxes, and Relational Databases, Part 2”.  The other demo was mine, and here's the code.  Again, the point of this demo was to show how two parties can exchange data from their databases using SqlXml.  Each database has a different schema and XML is used to transfer the data.  Both parties agree on a common XML schema for the data to to be transfered, and then each create a mapping to that XML schema for their database.  An XPath is issued against mapping one to retrieve data and bulkload is then used with the data and mapping two to load the second database.

Mapping against Northwind:

<xs:schema elementFormDefault='qualified' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:sql='urn:schemas-microsoft-com:mapping-schema'> 
    
<xs:element name='Employee' sql:relation='Employees' sql:key-fields='EmployeeID'> 
  <xs:complexType> 
    <xs:sequence> 
      <xs:element name='AddressList' sql:is-constant='1'>
        <xs:complexType>
          <xs:sequence>
            <xs:element name='Address' sql:is-constant='1'>
              <xs:complexType>
                <xs:sequence> 
                  <xs:element name='Street' type='xs:string' sql:field='Address' />
                  <xs:element name='City' type='xs:string' sql:field='City' />
                  <xs:element name='State' type='xs:string' sql:field='Region' />
                  <xs:element name='Zip' type='xs:string' sql:field='PostalCode' />
                  <xs:element name='Type' type='xs:string' sql:mapped='false' />
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence> 
        </xs:complexType> 
      </xs:element>
      <xs:element name='FirstName' type='xs:string' sql:field='FirstName' /> 
      <xs:element name='LastName' type='xs:string' sql:field='LastName' /> 
      <xs:element name='EmployeeID' type='xs:int' sql:field='EmployeeId' /> 
      <xs:element name='Title' type='xs:string' sql:field='Title' /> 
    </xs:sequence> 
  </xs:complexType> 
 </xs:element>

 <xs:annotation> 
   <xs:appinfo>
     <sql:relationship name='EmployeeAddress' parent='Employee' parent-key='EmployeeId' child='Address' child-key='EmployeeId' /> 
   </xs:appinfo> 
 </xs:annotation>
</xs:schema>

Code to Query:

   try
   {
    SqlXmlCommand mycmd = new SqlXmlCommand("Provider=SQLOLEDB;Server=localhost;database=Northwind;uid=test;password=test;");
    mycmd.CommandType = SqlXmlCommandType.XPath;
    mycmd.SchemaPath = "NWEMP.xml";
    mycmd.CommandText = "/Employee";
    mycmd.RootTag = "root"; 
    
    FileStream fs = new FileStream("EmpList.xml", System.IO.FileMode.Create);
    mycmd.ExecuteToStream(fs);
    fs.Close();
   }
   catch(Exception ex)
   {
    Console.WriteLine(ex.ToString());
   }

Mapping against Sample DB (Same database as in Andy's article, making the ID field an identiy column):

<xs:schema elementFormDefault='qualified'
xmlns:xs='http://www.w3.org/2001/XMLSchema'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
xmlns:sql='urn:schemas-microsoft-com:mapping-schema'
id='EmployeeMappingSchema'>

<xs:element name='Employee' sql:relation='Employee' sql:overflow-field='Overflow' sql:key-fields='EmployeeID'>
  <xs:complexType>
    <xs:sequence>
      <xs:element name='AddressList' sql:is-constant='1'>
        <xs:complexType>
          <xs:sequence>
            <xs:element name='Address' sql:relation='Address' sql:relationship='EmployeeAddress' sql:key-fields='AddressType'>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name='Street' type='xs:string' sql:field='Street' />
                  <xs:element name='City' type='xs:string' sql:field='City' />
                  <xs:element name='State' type='xs:string' sql:field='State' />
                  <xs:element name='Zip' type='xs:string' sql:field='Zip' />
                  <xs:element name='Type' type='xs:string' sql:field='AddressType' default="Work"/>
                </xs:sequence> 
              </xs:complexType> 
            </xs:element>
          </xs:sequence> 
        </xs:complexType>
      </xs:element>
      <xs:element name='FirstName' type='xs:string' sql:field='FirstName' />
      <xs:element name='LastName' type='xs:string' sql:field='LastName' />
      <xs:element name='EmployeeID' type='xs:int' sql:field='EmployeeID' />
      <xs:element name='Title' type='xs:string' sql:field='Title' />
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:annotation>
  <xs:appinfo>
    <sql:relationship name='EmployeeAddress' parent='Employee' parent-key='EmployeeID' child='Address' child-key='EmployeeID' /> 
  </xs:appinfo>
</xs:annotation>
</xs:schema>

Code to Bulkload (using COM Interop):

   try
   {
    SQLXMLBULKLOADLib.SQLXMLBulkLoad3Class objBL = new SQLXMLBULKLOADLib.SQLXMLBulkLoad3Class();
    objBL.ConnectionString =  "Provider=SQLOLEDB;Server=localhost;database=SampleEmployees2;uid=test;password=test;";
    objBL.ErrorLogFile = "error.xml";
    objBL.KeepIdentity = false;
    objBL.Execute ("SEDB.xml","EmpList.xml");
   }
   catch(Exception ex)
   {
    Console.WriteLine(ex.ToString());
   }