Well, before checking the files I would narrow down the possible file sources. Try deactivating your plugins (except the Yoast SEO plugin), and change to a default WordPress theme (such as 'twentyfourteen'). Then, try compiling the sitemap again and see if the issue is resolved.
If it is, you will want to switch back to regular theme then start turning on plugins one at a time, generating and checking the sitemap after each change, until you find the culprit.
You can use any text editor to check for whitespace, but an editor designed specifically for coding may make it easier. You can find a list of popular ones here: Glossary#Text_editor