Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System.XML/System.Xml/XmlTextReader.cs')
-rw-r--r--mcs/class/System.XML/System.Xml/XmlTextReader.cs25
1 files changed, 16 insertions, 9 deletions
diff --git a/mcs/class/System.XML/System.Xml/XmlTextReader.cs b/mcs/class/System.XML/System.Xml/XmlTextReader.cs
index 271ce5281d3..05d47909c81 100644
--- a/mcs/class/System.XML/System.Xml/XmlTextReader.cs
+++ b/mcs/class/System.XML/System.Xml/XmlTextReader.cs
@@ -374,6 +374,7 @@ namespace System.Xml
public override bool MoveToAttribute (string name)
{
MoveToElement ();
+ bool match = false;
if (attributes == null)
return false;
@@ -385,18 +386,24 @@ namespace System.Xml
while (orderedAttributesEnumerator.MoveNext ()) {
if(name == orderedAttributesEnumerator.Current as string) {
- string value = attributes [name] as string;
- SetProperties (
- XmlNodeType.Attribute, // nodeType
- name, // name
- false, // isEmptyElement
- value, // value
- false // clearAttributes
- );
+ match = true;
+ break;
}
}
- return false;
+ if (match) {
+
+ string value = attributes [name] as string;
+ SetProperties (
+ XmlNodeType.Attribute, // nodeType
+ name, // name
+ false, // isEmptyElement
+ value, // value
+ false // clearAttributes
+ );
+ }
+
+ return match;
}
[MonoTODO]