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

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 8 Dec 2003 01:21:50 -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.

http://bugzilla.ximian.com/show_bug.cgi?id=51851

--- shadow/51851	2003-12-08 01:21:50.000000000 -0500
+++ shadow/51851.tmp.26950	2003-12-08 01:21:50.000000000 -0500
@@ -0,0 +1,68 @@
+Bug#: 51851
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System.Data
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: davidandrewtaylor@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+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
+<FullTextResponse>
+  <Domains>
+    <AvailResponse info="y" name="novell-ximian-group" />
+    <AvailResponse info="n" name="ximian" com="n" />
+  </Domains>
+</FullTextResponse>
+
+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
+(System.Xml.XmlReader)
+in <0x0009b> System.Data.XmlDataLoader:LoadData
+(System.Xml.XmlReader,System.Data.XmlReadMode)
+in <0x000a0> System.Data.DataSet:ReadXml
+(System.Xml.XmlReader,System.Data.XmlReadMode)
+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
+"AvailResponse".