소스 검색

2009-02-23 Atsushi Enomoto <[email protected]>

        * XmlReader.cs : ReadContentAsXxx() should not advance XmlReader
          when it is on attribute *value* text.


svn path=/trunk/mcs/; revision=127725
Atsushi Eno 17 년 전
부모
커밋
822b2e868a
2개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 0
      mcs/class/System.XML/System.Xml/ChangeLog
  2. 3 1
      mcs/class/System.XML/System.Xml/XmlReader.cs

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

@@ -1,3 +1,8 @@
+2009-02-23  Atsushi Enomoto  <[email protected]>
+
+	* XmlReader.cs : ReadContentAsXxx() should not advance XmlReader
+	  when it is on attribute *value* text.
+
 2009-02-10  Atsushi Enomoto  <[email protected]>
 
 	* XmlTextWriter2.cs : similar fix in WriteStartElement() to

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

@@ -885,7 +885,9 @@ namespace System.Xml
 
 		private string ReadContentString ()
 		{
-			if (NodeType == XmlNodeType.Attribute)
+			// The latter condition indicates that this XmlReader is on an attribute value
+			// (HasAttributes is to indicate it is on attribute value).
+			if (NodeType == XmlNodeType.Attribute || NodeType != XmlNodeType.Element && HasAttributes)
 				return Value;
 			return ReadContentString (true);
 		}