We help IT Professionals succeed at work.

xml files

146 Views
Last Modified: 2017-03-27
Hi,

I've never worked with xml files.  I'm getting 30+ files with data that I need to load into sql table.  How do I do that

Thanks Taz
Comment
Watch Question

CERTIFIED EXPERT

Commented:
you can try openxml or xpath to do that.
Naitik GamitSoftware Developer
CERTIFIED EXPERT
Top Expert 2015

Commented:
CERTIFIED EXPERT

Commented:
if you want to automate the importing process, you probably can use SSIS or build a custom ETL program for that purposes.

Author

Commented:
Hi Naitik Gamit,

The solution you suggested seems good but I get confused with the line below.  My xml files does not have the "ROOT" tag, it has page headers, totals, etc..

Help Taz

SELECT CustomerID, CustomerName, Address
FROM OPENXML(@hDoc, 'ROOT/Customers/Customer')
Software Developer
CERTIFIED EXPERT
Top Expert 2015
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
Thank you