https://bugzilla.novell.com/show_bug.cgi?id=676020

https://bugzilla.novell.com/show_bug.cgi?id=676020#c2


--- Comment #2 from Federico Delgado <[email protected]> 2011-03-07 
14:37:52 UTC ---
Sorry I mixed up bug reports. Bellow is a test code for a console app.

    class Program
    {
        static void Main(string[] args)
        {
            string data = @"<SerializableStringDictionary>
<SerializableStringDictionary>
<DictionaryEntry Key=""Key1"" Value=""Value1""/>
<DictionaryEntry Key=""Key2"" Value=""Value2""/>
<DictionaryEntry Key=""Key3"" Value=""Value3""/>
</SerializableStringDictionary>
</SerializableStringDictionary>";

            using (StringReader st = new StringReader(data))
            {
                XmlReader xrd = XmlReader.Create(st);
                ReadXml(xrd);
            }

            Console.ReadLine();
        }

        public static void ReadXml(XmlReader reader)
        {
            if (!reader.ReadToDescendant("SerializableStringDictionary"))
            {
                return;
            }

            if (!reader.ReadToDescendant("DictionaryEntry"))
            {
                return;
            }

            do
            {
                reader.MoveToAttribute("Key");
                var key = reader.ReadContentAsString();
                reader.MoveToAttribute("Value");
                var value = reader.ReadContentAsString();
                Console.WriteLine(string.Format("Key: {0} Value {1}", key,
value));
            }
            while (reader.ReadToNextSibling("DictionaryEntry"));
        }
    }



(In reply to comment #1)
> You have attached wrong repro project. I grepped the entire project and found
> no call to MoveToNextSibling() or even "using System.Xml".

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to