Seems simple, but not. I know how to exclude JAVA files from the build (discussed here), but there's a problem when attempting the same thing with XML files.
Try it yourself: Right-click on the XML file in question, select "Build Path," and lo, the "Exclude" option is replaced with "Add to Build Path." It seems that Eclipse doesn't keep track of anything other than .java files. So these files cannot be excluded because they are technically not in the path yet.
However, if you're just testing some ideas and have a layout file with a bunch of errors (like from a sample file you downloaded from the net), you can't compile your project.