How to read text in blocks

Hi,

I have file which contains information written in blocks (every block is different). Is it possible to read every block one by one to another file (one block per file).

The input is something like this

<block1>
<empty line>
<block2>
<empty line>
...
...
...
<block25>
<empty line>
<block26>

I need to read <block1> to file.tmp. Make some manipulations with it and then rewrite the contents of file.tmp with <block2> make some manipulations with content of file.tmp and rewrite file.tmp with <block3> and initiate some manipulations with it. And so on....

Any ideas?