[Mono-bugs] [Bug 80233][Min] New - InnerText returns content of comments

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Dec 12 07:57:17 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 s-kiess at web.de.

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

--- shadow/80233	2006-12-12 07:57:17.000000000 -0500
+++ shadow/80233.tmp.7127	2006-12-12 07:57:17.000000000 -0500
@@ -0,0 +1,56 @@
+Bug#: 80233
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Minor
+Component: Sys.XML
+AssignedTo: atsushi at ximian.com                            
+ReportedBy: s-kiess at web.de               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: InnerText returns content of comments
+
+Description of Problem:
+XmlNode.InnerText sometimes returns the content of a XmlComment node.
+
+Steps to reproduce the problem:
+1. cat > CommentInnerText.cs << EOF
+using System;
+using System.Xml;
+
+public class CommentInnerText {
+  public static void Main () {
+    XmlDocument doc = new XmlDocument ();
+
+    doc.LoadXml ("<a><!--xx--></a>");
+    Console.WriteLine (doc.InnerText);
+
+    doc.LoadXml ("<a>yy<!--xx--></a>");
+    Console.WriteLine (doc.InnerText);
+  }
+}
+EOF
+2. mcs CommentInnerText.cs
+3. mono CommentInnerText.exe
+
+Actual Results:
+xx
+yy
+
+
+Expected Results:
+
+yy
+
+How often does this happen? 
+Always.
+
+Additional Information:
+I'm using mono 1.2.2.
+.NET returns the expected result.


More information about the mono-bugs mailing list