5

I have backed up my blog from blogger. The format of the file is Atom XML. What's a quick way to turn it into plaintext? Opening it in a browser leads to formatting errors...

slhck
  • 223,558
  • 70
  • 607
  • 592
ixtmixilix
  • 338
  • 1
  • 4
  • 11

2 Answers2

3

Here is a sample Atom to HTML XSLT stylesheet: http://snippets.dzone.com/posts/show/1162

If you attach it to your XML file like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="my-atom-to-html-stylesheet.xsl"?>
...

..then opening the XML in a modern browser will produce nice readable text.

If you change <xsl:output method="html"/> to <xsl:output method="text"/> and remove all the extra markup in the style sheet then you will get pure text output.

ccpizza
  • 7,456
  • 6
  • 54
  • 56
1

Depending on exactly what you want to include in your plain text version, a simple XSLT transform would work.

If you give an example of your ATOM XML and what you would want the text output to look like, I can give you an example.

Daniel Haley
  • 201
  • 1
  • 5