ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,312 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I created the table and want to load alim_2020_07_07.xml to ALIM
CREATE TABLE [dbo].[ALIM](
[alim_code] [int] NOT NULL,
[alim_nom_fr] [varchar](20) NOT NULL,
[ALIM_NOM_INDEX_FR] [varchar](50) NOT NULL,
[alim_nom_eng] [varchar](50) NOT NULL,
[alim_grp_code] [varchar](20) NOT NULL,
[alim_ssgrp_code] [varchar](20) NOT NULL,
[alim_ssssgrp_code] [varchar](20) NOT NULL
) ON [PRIMARY]
GO
alim_2020_07_07.xml
<?xml version="1.0" encoding="windows-1252" ?>
<TABLE>
<ALIM>
<alim_code> 1000 </alim_code>
<alim_nom_fr> Pastis </alim_nom_fr>
<ALIM_NOM_INDEX_FR> Pastis </ALIM_NOM_INDEX_FR>
<alim_nom_eng> Pastis (anise-flavoured spirit) </alim_nom_eng>
<alim_grp_code> 06 </alim_grp_code>
<alim_ssgrp_code> 0603 </alim_ssgrp_code>
<alim_ssssgrp_code> 060303 </alim_ssssgrp_code>
</ALIM>
<ALIM>
<alim_code> 1001 </alim_code>
<alim_nom_fr> Eau de vie </alim_nom_fr>
<ALIM_NOM_INDEX_FR> Eau de vie </ALIM_NOM_INDEX_FR>
<alim_nom_eng> Clear fruit brandy or eau-de-vie </alim_nom_eng>
<alim_grp_code> 06 </alim_grp_code>
<alim_ssgrp_code> 0603 </alim_ssgrp_code>
<alim_ssssgrp_code> 060303 </alim_ssssgrp_code>
</ALIM>
</TABLE>
Importing XML in SQL Server is very simple. You can use SQL Server Management Studio, BCP, or write code.
Examples of bulk import and export of XML documents (SQL Server)
I used Azure Data Studio it has some nice options to export to JSON,XML & CSV