Hello expert coders, I'm storing GData "Event" objects from the Google API in a datable (Ok, I had to cast them as an object or they wouldn't go in), and I can access all the properties of the events perfectly, and use them to update Google, but I cannot serialize the datatable (or a parent dataset) to file because:
Type 'Google.GData.Calendar.EventEntry, Google.GData.Calendar, Version=1.4.0.2, Culture=neutral, PublicKeyToken=aa6748391206b888' does not implement IXmlSerializable interface therefore can not proceed with serialization.
This happens whether I try to simply serialize as XML or binary, and I can't find a way around the problem; can't any data structure be saved to a file one way or another?
To set the context, I was originally saving the GData EventFeed as XML which took about 30 seconds to figure out using Google API's myEventFeed.saveToXML, thinking I'd just reload it later... I have spent two days trying to get the xml back into an EventFeed object, and have now switched to saving the EventEntry from the EventFeed to a datatable instead.
So I managed to save the Feed to XML 1.0 easily, but reading it back into a GData EventFeed was a different story - Google give you myFeed.saveToXML but no loadfromXML method :-/ So I ended up trying to add System.Runtime.Serialization to use something like:
Dim reader As XmlReader = XmlReader.Create(fileName) Dim rssFeed As SyndicationFeed = SyndicationFeed.Load(reader)
This looked promising at first, but the data isn't all in rssFeed, plus I've still got to get the data back into a Google.GData.Calendar.EventFeed before I can call the methods I need, and I can't figure out how to do that either. I suppose could just copy the most important bits of data over from the rssFeed into new EventEntry's, or do the same thing with the datatable by extracting the important data... but that's going to be so inelegant, and risky down the line.
Any ideas which way I should turn now? Am I barking up the wrong trees?
Thanks, Neil
VB .NET 3.5 VS 2008