This is interesting, but why not use their API?
http://en.wikipedia.org/w/api.php
It's part of mediawiki and available for each and every wikipedia subsite – as far as I can tell. We are using this as well to autocomplete data. And it works really well.
I prefer this method over 'scraping' the content.