Thanks for a great product!
Any chance of getting an export to dataset function?
The examples
(http://atomnet.sourceforge.net/example.html) have a
nice one but how about expanding this. Also, adding an
xsd schema (i.e. creating a typed dataset) would be
even more useful.
In the interim I've created the following based on Russell
Lindell's, but it would be nicer if Atom.NET contained it:
Function GetDataset(ByRef myfeed As AtomFeed) As
DataSet
Dim dsBlog As New DataSet
dsBlog.Tables.Add("tblEntries")
dsBlog.Tables("tblEntries").Columns.Add("Title",
GetType(String))
dsBlog.Tables("tblEntries").Columns.Add("URL",
GetType(String))
dsBlog.Tables("tblEntries").Columns.Add
("EntryDate", GetType(Date))
dsBlog.Tables("tblEntries").Columns.Add("Author",
GetType(String))
dsBlog.Tables("tblEntries").Columns.Add("Content",
GetType(String))
dsBlog.ExtendedProperties.Add("LatestBlogDate",
myfeed.Entries.Item(0).Issued.DateTime)
For Each oEntry As AtomEntry In myfeed.Entries
Dim oRow As DataRow = dsBlog.Tables
("tblEntries").NewRow
oRow!Title = oEntry.Title.Content
oRow!URL = oEntry.Links.Item(1).HRef.ToString
oRow!EntryDate = oEntry.Issued.DateTime
oRow!Author = oEntry.Author.Name()
oRow!Content = oEntry.Contents.Item
(0).Content
dsBlog.Tables("tblEntries").Rows.Add(oRow)
Next
Return dsBlog
End Function