Friday, 3 April 2015

Change from standalone="yes"?> encoding="utf-8" ?>

Change from <?xml version="1.0" standalone="yes"?>  to <?xml version="1.0" encoding="utf-8" ?>

If you use Dataset.WriteXml("C:\\a.xml"); you will get  <?xml version="1.0" standalone="yes"?>

 objDataSet.WriteXml("C:\\a.xml");


If you use ..you will get <?xml version="1.0" encoding="utf-8" ?>

 XmlWriterSettings settings = new XmlWriterSettings();
                            settings.OmitXmlDeclaration = false;
                            XmlWriter objwriter = XmlWriter.Create("C:\\a.xml", settings);
                            objDataSet.WriteXml(objwriter);
                            objwriter.Close();