[Mono-bugs] [Bug 74606][Nor] New - Space character in element name in Serialization

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 14 Apr 2005 09:11:09 -0400 (EDT)


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 andrews@mainsoft.com.

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

--- shadow/74606	2005-04-14 09:11:09.000000000 -0400
+++ shadow/74606.tmp.4991	2005-04-14 09:11:09.000000000 -0400
@@ -0,0 +1,59 @@
+Bug#: 74606
+Product: Mono: Class Libraries
+Version: 1.1
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.XML
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: andrews@mainsoft.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Space character in element name in Serialization
+
+using System;
+using System.Xml;
+using System.IO;
+using System.Diagnostics;
+using System.Xml.Serialization;
+using System.Data;
+
+public class TestSpace {
+	[XmlElement( ElementName = "Name with space", Namespace =
+"http://www.deriv.com")]
+	public int test {
+		get { return 4; }
+		set {}
+	}
+}
+
+
+public class Test {
+
+	static void Test6() {
+		TestSpace ts = new TestSpace();
+
+		XmlSerializer ser = new XmlSerializer(typeof(TestSpace));
+
+		ser.Serialize(Console.Out, ts);
+	}
+
+	public static void Main () {
+		Test6();
+
+	}
+} 
+
+Actual Results:
+Generated element name <Name with space>
+
+Expected Results:
+Element name <Name_x0020_with_x0020_space>
+
+How often does this happen? 
+Always