[Mono-bugs] [Bug 78536][Maj] Changed - XML deserialization doesnt process CDATA sections

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue May 30 13:27:03 EDT 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 leppie at webmail.co.za.

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

--- shadow/78536	2006-05-29 22:37:14.000000000 -0400
+++ shadow/78536.tmp.14121	2006-05-30 13:27:03.000000000 -0400
@@ -52,6 +52,45 @@
 }
 
 ----
 
 Next time you post bugs, please attach reproducible example code. Read
 other random bug reports and you'll understand how to write them.
+
+------- Additional Comments From leppie at webmail.co.za  2006-05-30 13:27 -------
+Here is a 'working' snippet to show the error.
+
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+public class Foo
+{
+	[XmlText]
+	public string Value;
+}
+
+public class Test
+{
+	public Foo foo;
+
+	public static void Main ()
+	{
+		XmlSerializer ser = new XmlSerializer (typeof 
+(Test));
+		ser.UnknownNode += new XmlNodeEventHandler(badnode);
+		string xml = @"<Test>
+  <foo><![CDATA[
+(?<filename>^([A-Z]:)?[^\(]+)\((?<line>\d+),(?<column>\d+)\):
+\s((?<warning>warning)|(?<error>error))\s[^:]+:(?<message>.+$)|
+(?<error>(fatal\s)?error)[^:]+:(?<message>.+$)
+	]]></foo>
+</Test>";
+		ser.Deserialize (new XmlTextReader (xml, 
+XmlNodeType.Document, null));
+	}
+	
+	static void badnode(object s, XmlNodeEventArgs e)
+	{
+		Console.WriteLine("BADNODE:" + e.Name);
+	}
+}


More information about the mono-bugs mailing list