procedure.
For the sake of simplicity i created here a xml schema @xml-schema and temporary table #TempTable.
DECLARE @ixml int
DECLARE @xml-schema varchar(max)
SET @xml-schema =''
--Create an internal representation of the XML document.
EXEC sp_xml_preparedocument @ixml OUTPUT, @xml-schema
-- Execute a SELECT statement that uses the OPENXML rowset provider.
SELECT *
Into #TempTable
FROM OPENXML(@ixml, '/ROOT/Trans',1)
WITH
(
TransId varchar(10),
[Add] bit,
Edit bit,
[Delete] bit,
[View] bit,
Block bit
)
Select * From #TempTable
drop table #TempTable
You can change it as per your requirement . have any query please contact me rahularyansharma@gmail.com