Using the API is an option when tied into a Facebook app.
SELECT uid2 FROM friend WHERE uid1=me()
That query will only produce user IDs, but that would solve your problem. You can also use the graph API to expand on that if you pick up your own access token.
This query will allow you to find usernames for each ID. Alternatively, you could use the full API to write your own script that will pull a JSON string for you. More details in the link below.
SELECT name FROM profile WHERE id=XXXXXXXX
This page will allow you to run these queries without being logged in. Parsing the data is up to you.