[Mono-bugs] [Bug 79803][Maj] New - Xml serialization of nullable types has wrong element name

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Nov 1 18:47:05 EST 2006


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 knocte at gmail.com.

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

--- shadow/79803	2006-11-01 18:47:05.000000000 -0500
+++ shadow/79803.tmp.21608	2006-11-01 18:47:05.000000000 -0500
@@ -0,0 +1,44 @@
+Bug#: 79803
+Product: Mono: Class Libraries
+Version: 1.1
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Sys.XML
+AssignedTo: atsushi at ximian.com                            
+ReportedBy: knocte at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Xml serialization of nullable types has wrong element name
+
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+
+namespace Main {
+        class MainClass {
+                static void Main() {
+                	XmlSerializer oSer = new XmlSerializer(typeof(int?));
+                	int? nullableType = 5;
+                	oSer.Serialize(Console.Out, nullableType);
+                }
+        }
+}
+
+
+This simple program returns:
+
+<?xml version="1.0" encoding="utf-8"?>
+<Nullable_x005F_x0060_1 xmlns:q1="http://www.w3.org/2001/XMLSchema"
+d1p1:type="q1:int"
+xmlns:d1p1="http://www.w3.org/2001/XMLSchema-instance">5</Nullable_x005F_x0060_1>
+
+
+Which is not the same as the output of MS.NET (with MS.NET the output is
+the same is if the int number wasn't nullable).


More information about the mono-bugs mailing list