I was looking for a way to do this as well, and came to the conclusion that no one had written something to do it, so I did so myself. =) I’m attaching it to this response.
It will convert a jabber spool directory into an XML file compatible with the “User Import Export” plugin for OpenFire. Just run:
./convert-jabber-spool.pl /var/lib/jabber > /tmp/openfire.xml
You’ll need the XML::Twig and Tie::IxHash perl modules through CPAN or your distribution.
The spool format is missing email address and name, (I just set name to the username), and I stubbed out most of the presence stuff in the roster bits, but I was able to get users/passwords/etc. imported into a jabberd -> openfire migration with this, and all seems to work.