title: convert dataset to xml (encoding="UTF-8"),
body: <p>I have an dataset which i need to convert to  xml with encoding="UTF-8  " specifiedin the xml  file </p>
  
  <pre><code> SqlConnection con = new SqlConnection(dbconn);
                  con.Open();
                  SqlDataAdapter cmd1 = new SqlDataAdapter("select * from employee", con);
                  DataSet ds = new DataSet();
                  cmd1.Fill(ds);
  
                  string strFileName = @"E:\Dif.xml";        
                  MemoryStream memStream = new MemoryStream(); 
                  StreamWriter writer = new StreamWriter(memStream, Encoding.UTF8);             
                  ds.WriteXml(writer, XmlWriteMode.WriteSchema);  
  </code></pre>
  
  <p>i see no  xml  file  been written,
   i wante dteh xml  file  to be  written in this  format  in the heading </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;  
  </code></pre>
  
  <p>so what is teh setting that i should be  doing while converting dataset to  xml.</p>
  
  <p>please help me out, i ma using vs2003,.net 1.1 framework</p>
  
  <p>thanks
  prince</p>