Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   get Gmail msgs. XML to Objects - XmlSerializer error(There is an error in XML) (http://www.go4expert.com/forums/gmail-msgs-xml-objects-xmlserializer-t18245/)

itaysela 29Jun2009 11:13

get Gmail msgs. XML to Objects - XmlSerializer error(There is an error in XML)
 
my code:


Code:

  XmlUrlResolver resolver = new XmlUrlResolver();
            resolver.Credentials = new NetworkCredential("username@gmail.com", "password");

            XmlReaderSettings settings = new XmlReaderSettings();
            settings.XmlResolver = resolver;

            XmlReader reader = XmlReader.Create("GOOGLE XML LINK..", settings);

            XmlSerializer XmlSerializerO = new XmlSerializer(typeof(List<entry>),"");


            List<entry> entrys = (List<entry>)XmlSerializerO.Deserialize(reader); // ERROR LINE. ON "reader" Object.


error:
There is an error in XML document (2, 2).



entry Class:

Code:

public class entry
    {
        public string title;
        public string summary;
        public string modified;
        public string issued;
        public string id;
        public string author;
        public string name;
        public string email;
       
        public entry()
        {}
    }

10x !


All times are GMT +5.5. The time now is 08:39.