[Mono-bugs] [Bug 51851][Nor] New - MONO Bug loading Hierarchical XML into DataSet

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 5 Feb 2004 19:12:18 -0500 (EST)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by davidandrewtaylor@hotmail.com.


--- shadow/51851	2004-02-05 19:12:18.000000000 -0500
+++ shadow/51851.tmp.31992	2004-02-05 19:12:18.000000000 -0500
@@ -0,0 +1,78 @@
+Bug#: 51851
+Product: Mono/Class Libraries
+Version: unspecified
+OS: unknown
+OS Details: 
+Status: RESOLVED   
+Resolution: INCOMPLETE
+Severity: Unknown
+Priority: Normal
+Component: Sys.Data
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: davidandrewtaylor@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: MONO Bug loading Hierarchical XML into DataSet
+Description of Problem:
+MONO has a problem when loading XML into the DataSet where the elements are
+more than 1 node deep.
+Note: This is a bug and works perfectly on MS.NET 1.0/1.1
+Steps to reproduce the problem:
+1. Load this data into an XML file: data.xml
+  <Domains>
+    <AvailResponse info="y" name="novell-ximian-group" />
+    <AvailResponse info="n" name="ximian" com="n" />
+  </Domains>
+2. Test using this CS file:
+using System;
+using System.Data;                                                        
+public class test
+  public static void Main()
+    {
+      DataSet ds = new DataSet();
+      ds.ReadXml("data.xml");
+    }                                                                     
+Actual Results:
+Unhandled Exception: System.Data.DuplicateNameException: A column named
+'AvailResponse' already belongs to this DataTable.
+in <0x00200> System.Data.DataColumnCollection:Add (System.Data.DataColumn)
+in <0x00079> System.Data.DataColumnCollection:Add (string)
+in <0x002bd> System.Data.XmlDataLoader:ReadModeInferSchema
+in <0x0009b> System.Data.XmlDataLoader:LoadData
+in <0x000a0> System.Data.DataSet:ReadXml
+in <0x000f0> System.Data.DataSet:ReadXml (System.Xml.XmlReader)
+in <0x0003b> System.Data.DataSet:ReadXml (string)
+in <0x0003c> .test:Main ()
+Expected Results:
+This should be loaded into the DataSet as per the MS.NET implementation. 
+In this case the DataSet should contain 2 Datatables; both "Domains" and
+------- Additional Comments From davidandrewtaylor@hotmail.com  2004-02-05 19:12 -------
+After retesting in MONO 0.30 the bug has changed.  Now the data is 
+loaded into the DataSet without an exception being thrown; however 
+there appears to be a problem with inferring the schema because when 
+the data is written back out using WriteXml(output.txt) certain 
+Attributes are modified and outputted as elements.  I have submitted 
+a new bug report for this new issue as bug: 53959
+For now I will mark this bug as Incomplete.