1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'C#' started by itaysela, Jun 29, 2009.

  1. itaysela

    itaysela New Member

    Joined:
    Jun 29, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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 !
     

Share This Page