hi vks1,
maybe you could use the XHTML Export? To do this simply fetch the page with "do=export_xhtml".
Looks like:
http://www.dokuwiki.org/dokuwiki/?do=export_xhtml - it should be possible to iterate over data/pages/**.txt to fetch all pages
Edit: see also:
http://www.dokuwiki.org/export