I am using the following to search a directory recursively for specific string and replace it with another:
grep -rl oldstr path | xargs sed -i \'s/oldstr/ne
Standard xargs has no good way to do it; you're better off using find -exec as someone else suggested, or wrap the sed in a script which does nothing if there are no arguments. GNU xargs has the --no-run-if-empty option, and BSD / OS X xargs has the -L option which looks like it should do something similar.