Links management is one of the really lacking areas of Wordpress I’d say. I have created an RPC extention as I said but recently I needed to import a larger batch and thought about the OPML import feature.

However, no docs to be found how that file should look like - kind of just “it’s just XML”. Finally I found it and was able to run a simple script to

a) pull the url:s out from a database

b) fetch the HTML title for each url

c) create the OPML file

d) Import it into Wordpress (done manually)

Some of that code is found in a utility I published - Create OPML links with C#.

It has nothing about the database calls but instead you paste your list of URLs and retrieves a nice OPML file out of it - with html titles fetched.