Quantcast
Channel: Microsoft Techies
Viewing all articles
Browse latest Browse all 430

Change from to

$
0
0
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();

Viewing all articles
Browse latest Browse all 430

Trending Articles