Browse Source

2004-03-27 Atsushi Enomoto <[email protected]>

	* XmlReader.cs : ReadInnerXml() should progress reader when it is on
	  an empty element. This fixes bug #56064.

svn path=/trunk/mcs/; revision=24662
Atsushi Eno 22 years ago
parent
commit
fc0cf34f1a

+ 5 - 0
mcs/class/System.XML/System.Xml/ChangeLog

@@ -1,3 +1,8 @@
+2004-03-27  Atsushi Enomoto <[email protected]>
+
+	* XmlReader.cs : ReadInnerXml() should progress reader when it is on
+	  an empty element. This fixes bug #56064.
+
 2004-03-27  Atsushi Enomoto <[email protected]>
 
 	* DTDReader.cs : In some places sequential parameter entity was

+ 3 - 1
mcs/class/System.XML/System.Xml/XmlReader.cs

@@ -323,8 +323,10 @@ namespace System.Xml
 			StringWriter sw = new StringWriter ();
 			XmlTextWriter xtw = new XmlTextWriter (sw);
 			if (NodeType == XmlNodeType.Element) {
-				if (IsEmptyElement)
+				if (IsEmptyElement) {
+					Read ();
 					return String.Empty;
+				}
 				int startDepth = Depth;
 				Read ();
 				while (startDepth < Depth) {