How to convert XML String to DataTable in Sql Server
DECLARE @CategoryLevel varchar(max) SET @CategoryLevel = '<DocumentElement> <CategoryLevel> <Mapping_ID>0</Mapping_ID> <Level_ID>1</Level_ID> <Level_Description>LEVEL1</Level_Description> <Level_Score>10</Level_Score> <IsChecked>true</IsChecked> </CategoryLevel> <CategoryLevel> <Mapping_ID>0</Mapping_ID> <Level_ID>2</Level_ID> <Level_Description>LEVEL2</Level_Description> <Level_Score>30</Level_Score> <IsChecked>true</IsChecked> </CategoryLevel> </DocumentElement>' DECLARE @handle INT DECLARE @PrepareXmlStatus INT EXEC @PrepareXmlStatus= sp_xml_preparedocument @handle OUTPUT, @CategoryLevel DECLA...