I have a table in SQL Server. In this table, I have a column Response
of datatype XML
value. How can I deserialize this XML value like a new table?
My table columns are: CreateDate
, Request
and Response
.
<request-message version="1.0">
<request class="GET_ALL">
<parameter name="IsInSystem" type="System.Boolean">True</parameter>
<parameter name="ConfirmDate" type="System.DateTime">2021-05-04 00:00:00.000</parameter>
<parameter name="ConfirmTime" type="System.DateTime">2021-05-04 00:00:00.000</parameter>
</request>
I want to write this response to a table with parameters as a column.
Not entirely sure what you're trying to do - plus the XML shown is invalid (missing end tag for
<request-message>
).Maybe something like this?? I'm just iterating over the
<parameter>
nodes and outputting all relevant info I can think of, as a relational data set:This would give you a result something like this: