How would I go about creating a Wiki Parser?

I just wrote an answer in another thread. Short version: Going through HTML worked well for me when converting DokuWiki and Confluence content, which was exported as a static website.