Click here to Skip to main content
15,909,091 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a XML file with lot of attributes with lot of data.I want to bulk insert any 5 attribute from XML file to SQL server.please help me guys....

What I have tried:

My sample XML file..
I mentioned 2 attributes(same attribute repeated many times),like this lot of attributes there..
i want to bulk insert(all data same attribute name) any 2 attributes data into SQLserver

XML
<<fsxml>
  <report>
    <SchemaList>
      <Schema>PDU_FORMULA_DEV_001.xsd</Schema>
      <Schema>PDU_ITEM_DEV_001.xsd</Schema>
    </SchemaList>
    <object>
 <FSDATAMATRIX>
        <TABLE_CODE>GRADING_REQUIREMENTS</TABLE_CODE>
        <SYMBOL>FORMULA</SYMBOL>
        <VIEW_ID>0</VIEW_ID>
        <DESCRIPTION>Grading Requirements</DESCRIPTION>
        <ROW_ADD_IND>1</ROW_ADD_IND>
        <OWNER_CODE>FSI</OWNER_CODE>
        <GROUP_CODE>ADMIN</GROUP_CODE>
        <OWNER_SECURITY>15</OWNER_SECURITY>
        <GROUP_SECURITY>15</GROUP_SECURITY>
        <ROLE_SECURITY>15</ROLE_SECURITY>
        <DB_TABLE_NAME>FORMULA0</DB_TABLE_NAME>
        <SORT_ORDER>LINE_ID ASC</SORT_ORDER>
      </FSDATAMATRIX>
<FSFORMULADOC>
        <DOC_ID>101015</DOC_ID>
        <FUNCTION_CODE>PRODUCT_SUMMARY</FUNCTION_CODE>
        <TEXT_DATA />
        <ATTCH_CNT>0</ATTCH_CNT>
        <ATTCH_TYPE>0</ATTCH_TYPE>
        <DOC_ORDER>1</DOC_ORDER>
        <DOC_DESCRIPTION>Product Summary</DOC_DESCRIPTION>
        <FORMULA_CODE>701399-ML81</FORMULA_CODE>
        <VERSION>01</VERSION>
        <SRVROW_ID>1</SRVROW_ID>
        <FUNCTION_CODE_LABEL>PRODUCT_SUMMARY</FUNCTION_CODE_LABEL>
      </FSFORMULADOC>
 </object>
  </report>
</fsxml>
Posted
Updated 19-Mar-17 22:08pm

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900