[Mono-bugs] [Bug 79019][Nor] New - Unable to use WriteBinHex method

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Aug 6 11:34:34 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 marek.safar at seznam.cz.

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

--- shadow/79019	2006-08-06 11:34:34.000000000 -0400
+++ shadow/79019.tmp.25633	2006-08-06 11:34:34.000000000 -0400
@@ -0,0 +1,75 @@
+Bug#: 79019
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.XML
+AssignedTo: atsushi at ximian.com                            
+ReportedBy: marek.safar at seznam.cz               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Unable to use WriteBinHex method
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1. compile following program with gmcs
+2. 
+using System;
+using System.Xml;
+
+public class Test {
+	public static void Main () {
+		using (XmlWriter writer = XmlWriter.Create (Console.Out)) {
+			writer.WriteStartElement("test");
+			byte[] buffer1 = new byte[] { 200, 155 };
+			writer.WriteStartAttribute("key");
+			writer.WriteBinHex(buffer1, 0, buffer1.Length);
+			writer.WriteEndAttribute();
+			writer.WriteEndElement();
+		}
+        
+	}
+}
+
+
+Actual Results:
+
+<?xml version="1.0" encoding="windows-1250"?><test key="
+Unhandled Exception: System.InvalidOperationException: This XmlWriter does
+not accept BinHex at this state Attribute.
+  at System.Xml.XmlTextWriter.ShiftStateContent (System.String occured,
+Boolean allowAttribute) [0x00000]
+  at System.Xml.XmlTextWriter.WriteBinHex (System.Byte[] buffer, Int32
+index, Int32 count) [0x00000]
+  at Test.Main () [0x00000]
+
+Unhandled Exception: System.InvalidOperationException: This XmlWriter does
+not accept EndElement at this state Error.
+  at System.Xml.XmlTextWriter.WriteEndElementCore (Boolean full) [0x00000]
+  at System.Xml.XmlTextWriter.WriteEndElement () [0x00000]
+  at System.Xml.XmlTextWriter.Close () [0x00000]
+  at System.Xml.XmlWriter.Dispose (Boolean disposing) [0x00000]
+  at System.Xml.XmlWriter.System.IDisposable.Dispose () [0x00000]
+  at Test.Main () [0x00000]
+
+Expected Results:
+
+<?xml version="1.0" encoding="ibm852"?><test key="C89B" />
+
+How often does this happen? 
+
+100%
+
+Additional Information:
+
+I'm not sure whether it is 2.0 problem only or not.


More information about the mono-bugs mailing list