2003-03-12 Alan Tam <Tam@SiuLung.com>
authorAlan Tam <alantam@mono-cvs.ximian.com>
Wed, 12 Mar 2003 14:04:39 +0000 (14:04 -0000)
committerAlan Tam <alantam@mono-cvs.ximian.com>
Wed, 12 Mar 2003 14:04:39 +0000 (14:04 -0000)
        * XmlDataDocument.cs: Still need to print tag for the DataSet if there
        is no data at all.

svn path=/trunk/mcs/; revision=12458

mcs/class/System.Data/System.Xml/ChangeLog
mcs/class/System.Data/System.Xml/XmlDataDocument.cs

index 0ac88bca034a58b17acf58f67b03f4527be45017..597f102b04b7fefbc2998936d1704512c9a07474 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-12  Alan Tam <Tam@SiuLung.com>
+
+       * XmlDataDocument.cs: Still need to print tag for the DataSet if there
+       is no data at all.
+       
 2003-01-27  Ville Palo <vi64pa@koti.soon.fi>
 
        * ChangeLog: Added this file.
index 16b4a70d538f4bf16cf1da458787b58398453eb5..a45d2a45eb82b5f2f80077c22cca509cf7395ff6 100644 (file)
@@ -63,24 +63,11 @@ namespace System.Xml {
 
                        this.dataSet = dataset;
 
-                       // Read DataSet in as document if there is data in tables
-                       bool HaveRows = false;
-                       foreach (DataTable T in dataSet.Tables) {
+                       XmlReader xmlReader = new XmlTextReader (new StringReader (dataSet.GetXml ()));
 
-                               if (T.Rows.Count > 0) {
-                                       HaveRows = true;
-                                       break;
-                               }
-                       }
-
-                       if (HaveRows) {
-
-                               XmlReader xmlReader = new XmlTextReader (new StringReader (dataSet.GetXml ()));
-
-                               // Load DataSet's xml-data
-                               base.Load (xmlReader);
-                               xmlReader.Close ();
-                       }
+                       // Load DataSet's xml-data
+                       base.Load (xmlReader);
+                       xmlReader.Close ();
 
                        foreach (DataTable Table in DataSet.Tables) {