Hi,I can't get the following xml when i run the stored proc. The output is wrong because first it shows different data and second it repeats the same data twice. <instances><instance> <instanceid>0</instanceid> <councilname>xxxxx</councilname> <connectionstring>xxxxx</connectionstring></instance><instance> <instanceid>0</instanceid> <councilname>yyy</councilname> <connectionstring>yyyy</connectionstring></instance></instances>code snippet of stored procedureEXEC sp_xml_preparedocument @idoc OUTPUT, @InstancesXml, '<instancesxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>' SELECT InstanceId, CouncilName, ConnectionString FROM OPENXML(@idoc,'/instances/instance') WITH ( InstanceId INT './instanceid[not(@xsi:nil = "true")]', CouncilName nvarchar './councilname', ConnectionString nvarchar './connectionstring' )