CREATE Procedure TesterXMLInput
@XML Text
As
SET NOCOUNT ON
Declare @iDoc Integer
Exec sp_xml_preparedocument @iDoc OUTPUT, @XML
-- uncomment the next 2 lines to insert into table
--Insert
--Into tblA(fldA, fldB, fldC)
Select fldA, fldB, fldC
From OpenXML(@iDoc, '//root/data', 1)
With (
fldA Int,
fldB Varchar(10),
fldC datetime
)