For a while now, I've been frustrated at the way Dreamweaver 4 handles XHTML documents, including its tendency to think that the XML declaration at the top of each document is a PHP tag.
Well, it seems as if I've found a way around it, and it's so simple I literally kicked myself for not seeing it earlier. To prevent DW4 from choking on the XML declaration, simply add comments around it, like this:
<!-- <?xml version="1.0"?> --> After doing this, I thought, "hmm, I wonder if this will validate properly, though?" and went to the W3C's validator page. To my surprise, my page validated as XHTML 1.0 Transitional. (It validated before I added the comments, too).
This has certainly made the wait for Dreamweaver 5 a lot easier! Now I can properly see my page in DW4 without those yellow error tags everywhere, and only need to correct things such as <br /> and <img /> tags (which Dreamweaver doesn't add the end slash to).