G
Thanks, that's exactly it. The parser reports where it gave up, not where the mistake is, so the line just above is usually the culprit. Great point on the BOM too. It's invisible in most editors and the error message gives no hint, so stripping it first (or re-saving as UTF-8 without BOM) saves a lot of head-scratching. I'll add it to the post.
