How do you produce a apache RewriteRule that catches any request URL ending insxml, strips from the .xml and passes it to some specific script?

http://www.example.com/document.xml, becomes http://www.example.com/document passed to script.php

This will have the desired effect, In my opinion.

RewriteRule ^(.+)\.xml$ script.php?path=$1