I know I can use grep to find a word in all the files present in a folder like this
grep -rn core .
grep -rn core *.xml // Does not work
Try the --include option
grep -R --include="*.xml" "pattern" /path/to/dir
Reference: Grep Include Only *.txt File Pattern When Running Recursive Mode