What else could you expect from Google :(

Armed with the minimum ATOM-like document Blogger accepts, I wrote an XSL transformation that converted my proprietary news feed format into Blogger-liked ATOMish format. I used Saxon as the transformation engine, resulting in a nice UTF-8 encoded file that opened easily in Internet Explorer, Firefox and XML Notepad.

The end result: Blogger refused to import the file until I've opened it in FrontPage and prettified the XML text. Obviously they have a "custom" XML parser that has problems with some valid variants of XML. But what else can one expect from company that wants to build everything on its own.

Import into Blogger from an Atom feed

Google has recently added the import functionality to Blogger, making it very easy to migrate from any other information service to Blogger. Unfortunately, the import process rejects anything that looks like it did not come from the Blogger export feature. I did not try to nail down the very minimum that would be required for the import to work, but this is a very minimalistic Atom document that works:

<?xml version='1.0' encoding='utf-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' 
      xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'  
      xmlns:gd='http://schemas.google.com/g/2005'
      xmlns:thr='http://purl.org/syndication/thread/1.0'>
    <id>tag:blogger.com,1999:blog-123456789.archive</id>
    <updated>2008-11-01T00:00:00.000+01:00</updated>
    <title type='text'>Sample import file</title>
    <author>
        <name>Example.com</name>
        <uri>http://www.blogger.com/profile/12345678</uri>
        <email>noreply@blogger.com</email>
    </author>
    <generator version='7.00' uri='http://www.blogger.com'>Blogger</generator>
    <entry>
        <id>tag:blogger.com,1999:blog-123456789.post-12345678</id>
        <published>2008-11-01T00:00:00.000+01:00</published>
        <updated>2008-11-01T00:00:00.000+01:00</updated>
        <category scheme='http://schemas.google.com/g/2005#kind' 
          term='http://schemas.google.com/blogger/2008/kind#post'/>
        <category scheme='http://www.blogger.com/atom/ns#' term='CatItem'/>
        <title type='text'>Post title</title>
        <content type='html'>Post text, HTML needs to be escaped</content>
        <author>
            <name>Example.com</name>
            <uri>http://www.ioshints.info/about</uri>
            <email>noreply@blogger.com</email>
        </author>
        <thr:total>0</thr:total>
    </entry>
</feed>