1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

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

    my 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.

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

    entry Class:

    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