title: XML parsing: line 4, character 19, text/xmldecl not at the beginning of input
body: <p>Hi I have used this below code and passed XML parameter to sql server from C# am getting the below error" XML parsing: line 4, character 19, text/xmldecl not at the beginning of input"</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;ArrayOfInt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"          xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
   &lt;int&gt;1&lt;/int&gt;
   &lt;/ArrayOfInt&gt;
  </code></pre>
  
  <p>and here is my C# code:</p>
  
  <pre><code> private void searchLeval1Language()
  {
  
      List&lt;int&gt; ClientId = new List&lt;int&gt;();
      List&lt;int&gt; FieldId = new List&lt;int&gt;();
      List&lt;int&gt; StatusId = new List&lt;int&gt;();
      string[] Client = null;
      Client = hdnClientID.Value.Split(',');
      if (Client != null)
      {
  
          foreach (string s in Client)
          {
              if (!string.IsNullOrEmpty(s))
              {
                  ClientId.Add(Convert.ToInt32(s));
              }
          }
      }
      string[] Field = null;
      Field = hdnFieldID.Value.Split(',');
      if (Field != null)
      {
          foreach (string s in Field)
          {
              if (!string.IsNullOrEmpty(s))
              {
                  FieldId.Add(Convert.ToInt32(s));
              }
          }
      }
      XmlSerializer xs = new XmlSerializer(typeof(List&lt;int&gt;));
      MemoryStream ms = new MemoryStream();
      xs.Serialize(ms, ClientId);
      string xmlClientid = UTF8Encoding.UTF8.GetString(ms.ToArray());
      xs.Serialize(ms, FieldId);
      string xmlFieldid = UTF8Encoding.UTF8.GetString(ms.ToArray());
      xs.Serialize(ms, FieldId);
      string xmlStatusid = UTF8Encoding.UTF8.GetString(ms.ToArray());
      DataTable dtLangL2 = RetrievalProcedures.GetPartnerProfileIdforDashboardSearchLevel2(hdnL1toL2.Value, xmlClientid, xmlStatusid);
      chLanguageL2.Series["LangSeriesL2"].XValueMember = "FieldName";
      chLanguageL2.Series["LangSeriesL2"].YValueMembers = "cnt";
      chLanguageL2.DataSource = dtLangL2;
      chLanguageL2.DataBind();
  }
  </code></pre>
  
  <p>And this is the code to pass parameter to database</p>
  
  <pre><code>      public static DataTable GetPartnerProfileIdforDashboardSearchLevel2(System.String language, System.String clientId, System.String statusProId)
      {
          // create parameters
          SqlParameter[] parameters = new SqlParameter[3];
          parameters[0] = new SqlParameter("@Language", SqlDbType.VarChar, 100, ParameterDirection.Input, true, 0, 0, "",  DataRowVersion.Current, language);
          parameters[1] = new SqlParameter("@ClientId", SqlDbType.Xml, 2147483647, ParameterDirection.Input, true, 0, 0, "",  DataRowVersion.Current, clientId);
          parameters[2] = new SqlParameter("@StatusProId", SqlDbType.Xml, 2147483647, ParameterDirection.Input, true, 0, 0, "",  DataRowVersion.Current, statusProId);
  
          // Call the stored proc.
          DataTable toReturn = new DataTable("GetPartnerProfileIdforDashboardSearchLevel2");
          bool hasSucceeded = DbUtils.CallRetrievalStoredProcedure("[JobApplicationModule].[dbo].[sp_GetPartnerProfileIdforDashboardSearchLevel2]", parameters, toReturn, null);
  
          return toReturn;
      }
  </code></pre>