It can happen that your sitemap.xml or your robots.txt file finds it’s way into the index. Just do the following query site:yourdomain.com filetype:xml to see what XML files you have listed from your domain. Here is an example of some files indexed for the domain court.us.

It’s probably not what you really want, as basically it’s just trash in the SERPs. To fix this, and remove it from the SERPs, you can simply add some extra details to your .htaccess file which will send the the proper X-Robots-Tag.
For your .htaccess file
<FilesMatch "sitemap\.xml">
Header set X-Robots-Tag "noindex"
</FilesMatch>
<FilesMatch "robots\.txt">
Header set X-Robots-Tag "noindex"
</FilesMatch>
This method can also be used to remove all word documents or similar from the index.
<FilesMatch "\.doc$">Header set X-Robots-Tag "index, noarchive, nosnippet" </Files>
To check your MIME type
http://redbot.org/ is a handy tool to check out the MIME headers, cache control and FileTypes. Their code is opensource so you can run a version on your server.
Thanks
Thanks to some people like Carlo Zottmann , JohnMu, & Paul Cawley for giving me some pointers on this.

5.30.2011
To make the Googlebot not even try to crawl these files in the first place, you might wanna exclude them in your robots.txt:
————————————
User-agent: Googlebot
Disallow: /*.xml$
————————————
Only Googlebot allowod wildcards last time I checked.
5.30.2011
Hi Mat, you are of course right , but in some cases you might want to have actual XML files in the SERPs, like if you want to rank for examples of XML manifests for Android for example. But your average Joe probably doesn’t need that corner case.
P
9.29.2011
I presume that this treatment does not lead to Google not being able to read the sitemap.xml or robots.txt for their usual purposes?
9.29.2011
No it just doesn’t index it. Google reads, and follows links, even if they are no-index or no-follow. But it indexes them differently or attributes value differently depending on what you have set. This solution is really more about how to get these pages out of the index in a nice way, doing a site:yourdomain.com should not show your robots.txt or sitemap.xml IMHO.