I have this XML file which is a returned data table from web service:
DECLARE @MyXML XML =
'<?xml version="1.0" encoding="utf-8"?>
<DataTable xmlns="http://tempuri.org/">
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="Blah" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Blah">
<xs:complexType>
<xs:sequence>
<xs:element name="Col1" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<DocumentElement xmlns="">
<Blah diffgr:id="Blah1" msdata:rowOrder="0" diffgr:hasChanges="inserted">
<Col1>testing1</Col1>
</Blah>
</DocumentElement>
</diffgr:diffgram>
</DataTable>'
I want an output like this: Select Col1
Col1
testing1
Then, I would be able to insert the data into a table in sql.