Generate WRX from BlogML

As you can see, PureSourceCode has a brand-new design. Do you like it? I have decided to move the blog from BlogEngine.net to WordPress.

The challenge I faced was to migrate all my posts from 2011. And it was a quite tricky challenge. First, because in the admin section of BlogEngine.net there is no longer an option to export your posts. After googling a bit, I discovered the code for the export is there but you have to add manually advanced at the end of the URL like:

https://localhost:64079/kindle/admin/#/settings/advanced

So, you can see this page and click Export.

When you click on Export, basically you can a service call blogml.axd. The url is for example:

https://localhost:64079/kindle/blogml.axd

Now we have the file with all posts but in WordPress there is no way to import this kind of file. No way!

I tried to find something but nothing is working. I have to write some code for converting this file.

BlogML is an XML format for storing the entire content of a blog. You can use BlogML as a way to archive the contents of blogs or to act as a standard format for transferring content from one blog to another – this could include migrating a blog from one blogging engine to another. There are currently several blogging engines that provide support for BlogML including:

  • Community Server
  • Das Blog
  • Subtext
  • SingleUserBlog
  • Windows Live Spaces
  • WordPress

There are also implementations that exist for converting Blogger content to BlogML. The only documentation I found was in Web Archive.

Then, I have to start a new project. From the XML I can create the XSD with its schema documentation and the model for the BlogML. After a couple of hours I finished the code: you find my code in Github.

BlogML to WRX

The tool can be used if you need to convert BlogML (for example export from Blogengine.net) format into WRX file (WordPress Extended RSS import file format) for subsequent import it into WordPress.

The code in this repository has error handling/logging enhancements and fixed import of multiple comments.

Parameters

Options available with the tool.

  • RemoveComments
  • ExportToWRX
  • QATarget
  • QASource
  • NewWRXWithOnlyFailedPosts
  • SourceImageUrl
  • DestinationImageUrl

Usage

You simply run the tool with the following command

BlogMLMLCore.exe 
    /Action:ExportToWRX 
    /BlogMLFile:BlogML.xml 
    /SourceUrl:https://puresourcecode.com 
    /TargetUrl:https://puresourcecode.com 
    /SourceImageUrl:https://puresourcecode.com/javascript/image.axd?picture=
    /DestinationImageUrl:https://puresourcecode.com/myimg/javascript/

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.