首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > XML SOAP >

怎樣寫sqlxml需求的結構文件?解决思路

2012-03-22 
怎樣寫sqlxml需求的結構文件?ROOTTRCustomerId 1111 /CustomerIdCompanyName SeanChai /Compan

怎樣寫sqlxml需求的結構文件?
<ROOT>
    <TR>
        <CustomerId> 1111 </CustomerId>
        <CompanyName> Sean   Chai </CompanyName>
        <City> NY </City>
    </TR>
    <TR>
        <CustomerId> 1112 </CustomerId>
        <CompanyName> Tom   Johnston </CompanyName>
        <City> LA </City>
    </TR>
    <TR>
        <CustomerId> 1113 </CustomerId>
        <CompanyName> Institute   of   Art </CompanyName>
    </TR>
</ROOT>


========================》

<?xml   version= "1.0 "   ?>
<Schema   xmlns= "urn:schemas-microsoft-com:xml-data "  
                xmlns:dt= "urn:schemas-microsoft-com:xml:datatypes "    
                xmlns:sql= "urn:schemas-microsoft-com:xml-sql "   >  

      <ElementType   name= "CustomerId "     dt:type= "int "   />
      <ElementType   name= "CompanyName "   dt:type= "string "   />
      <ElementType   name= "City "   dt:type= "string "   />

      <ElementType   name= "TR "     sql:relation= "cust ">
            <element   type= "CustomerId "     sql:field= "CustomerID "   />
            <element   type= "CompanyName "   sql:field= "CompanyName "   />
            <element   type= "City "                 sql:field= "City "   />
      </ElementType>
</Schema>



[解决办法]
一定要sqlxml吗?
如果只是倒XML数据进入SQL SERVER,可以考虑用OpenXML

热点排行