Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
?<ns0:NumRequest xmlns:ns0="http://www.google.co.za/xml/schemas/version/1.0" xmlns:ns1="http://www.google.co.za/Doc/xml/schemas/version/1.0">
    <ns0:SType>INITIAL</ns0:SType>
    <ns1:RetInfor xmlns:ns3="http://www.google.co.za/RetInfor/xml/schemas/version/1.0">
        <ns3:BusinessInformation xmlns:ns3="http://www.google.co.za/BusinessInfor/xml/schemas/version/1.0">
            <ns3:Number>4562100001</ns3:Number>
            <ns3:Period>201204</ns3:Period></ns0:NumRequest>
Posted
Updated 5-Nov-14 1:52am
v2
Comments
Richard MacCutchan 5-Nov-14 7:20am    
Is there supposed to be a question in there somewhere?
Member 11158507 5-Nov-14 7:50am    
Hi Richard the question is how can I convert this xml file to an SQL table
The fields are SType,Number,Period
Richard MacCutchan 5-Nov-14 7:54am    
Presumably by writing some code to read the XML and insert records into your database.
Member 11158507 5-Nov-14 7:56am    
Thank You :)

1 solution

Try using the Dataset built in function to load the xml into a DataTable:

DataSet.ReadXml(xlmFile);

Then you may send a SQL command from the dataset DataAdapter or similar approach.
 
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