浏览代码

2003-11-22 Atsushi Enomoto <[email protected]>

	* XmlTextReader.cs : Fixed ReadInnerXml(). This fixes bug #51267.

svn path=/trunk/mcs/; revision=20328
Atsushi Eno 22 年之前
父节点
当前提交
ebbc046198
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 4 0
      mcs/class/System.XML/System.Xml/ChangeLog
  2. 2 1
      mcs/class/System.XML/System.Xml/XmlTextReader.cs

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

@@ -1,3 +1,7 @@
+2003-11-22  Atsushi Enomoto  <[email protected]>
+
+	* XmlTextReader.cs : Fixed ReadInnerXml(). This fixes bug #51267.
+
 2003-11-20 Eran Domb <[email protected]>
 2003-11-20 Eran Domb <[email protected]>
 
 
 	* XmlTextWriter.cs (WriteStartAttribute) : Check if the ket already exists in the newAttributeNamespaces table 
 	* XmlTextWriter.cs (WriteStartAttribute) : Check if the ket already exists in the newAttributeNamespaces table 

+ 2 - 1
mcs/class/System.XML/System.Xml/XmlTextReader.cs

@@ -649,6 +649,7 @@ namespace System.Xml
 		}
 		}
 
 
 #if NET_1_0
 #if NET_1_0
+		StringBuilder innerXmlBuilder;
 		public override string ReadInnerXml ()
 		public override string ReadInnerXml ()
 		{
 		{
 			if (readState != ReadState.Interactive)
 			if (readState != ReadState.Interactive)
@@ -656,7 +657,7 @@ namespace System.Xml
 
 
 			switch (NodeType) {
 			switch (NodeType) {
 			case XmlNodeType.Attribute:
 			case XmlNodeType.Attribute:
-				return value.Substring (1, value.Length - 2);
+				return Value;
 			case XmlNodeType.Element:
 			case XmlNodeType.Element:
 				if (IsEmptyElement)
 				if (IsEmptyElement)
 					return String.Empty;
 					return String.Empty;