Keyvan Nayyeri

God breathing through me

Community Server 2007 BlogML Converter Beta

I promised to release my BlogML converter for Community Server 2007 very soon.  Before leaving home, today I had some spare time to spend on my converter and upgrade it to Community Server 2007 Beta 1 and add some features.

For a few months some features were in my TO ADD list for next version.  Thank to Jon Galloway and Dan Hounshell for their great feedbacks, this new converter is more compatible with common blog data and has less issues to work on servers.

First of all I updated my converter code to be compatible with some changes in Community Server 2007 APIs.  After that I increased timeout for server as suggested by Dan.  Jon had suggested (and had given an initial code) to compress output with GZip to speed up the export process and two nights ago pinged me about it again and I added this new feature as well.  Final source code for export button event handler is presented below (actually I merged, modified and added a few lines of code to initial codes that were provided by Jon and Dan.

Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    Dim AppKey As String = MyBase.CurrentWeblog.ApplicationKey.ToString()

 

    Dim timeout = Server.ScriptTimeout

    Try

        Server.ScriptTimeout = 900

 

        Response.Buffer = False

        Response.Clear()

        Response.ContentType = "application/xml"

 

        Dim Output As Stream = Response.OutputStream

 

        Dim ZipStream As GZipStream = New GZipStream(Response.OutputStream, _

            CompressionMode.Compress)

        Response.AppendHeader("Content-Encoding", "gzip")

        Output = ZipStream

 

        Dim Utf8 As New UTF8Encoding(False)

        Dim Writer As XmlTextWriter = New XmlTextWriter(Output, Utf8)

 

        Dim objBlogML As New CommunityServer.BlogML.Writer(AppKey)

 

        objBlogML.Write(Writer)

 

        Writer.Flush()

        Writer.Close()

        Response.End()

    Catch ex As Exception

    Finally

        Server.ScriptTimeout = timeout

    End Try

End Sub

New version is in Beta and I'll release final version after that Telligent releases Community Server 2007 RTM.  Like its preceding version, this version works with BlogML 2.0 APIs and specification.  I didn't have much time to test this converter with many samples but it passed initial tests.  So I'll be glad to receive your feedbacks and bug reports about this control.

You can download Community Server 2007 BlogML Converter Beta with source code and installation instructions from my file gallery (it's also available on BlogML workspace).

2 Comments

Keyvan Nayyeri
Feb 23, 2007 4:32 AM
#

Last week Telligent released Community Server 2007 Beta 1 publicly to let users enjoy the power of


Keyvan Nayyeri
May 29, 2007 10:47 AM
#
A forum post on Community Server forums bit me to make an update on my Community Server 2007 BlogML converter

Leave a Comment





Ads Powered by Lake Quincy Media Network