Converting WordPress Export XML to HTML

WordPress implements an Export function which allows bloggers to download the contents of their blog as a single XML file.

Based on my previous work in dbscript to generate an HTML documentation of a database schema using XML and XSL I modified the “Single HTML” XSL of dbscript to create an XSL to transform the WordPress Export XML into an HTML page.

This HTML page lists all article titles with dates, categories and link to the original URL in the blog.

Clicking the article’s title will expand the list to display the contents of the selected article.

To display paragraphs properly, I needed to replace newlines with <br /> elements, as described on this page implementing various replace operations in XSL.

The WordPress HTML XSL file is available for download here.

8 thoughts on “Converting WordPress Export XML to HTML

  1. Pingback: Generating Table of Contents from WordPress Export « devioblog

  2. Pingback: wpxslgui – WordPress XML Export Converter « devioblog

  3. The site you’re hosting the file one required login… and the ‘New Account’ link goes to ‘Page Not Found’.

    Is there any chance you could put the file somewhere it can be downloaded?

  4. Thank you very much for this app! As my WP has been hacked and all i have is an older XML-Backup with my recipes! You made my day!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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