As to your question of where the XMP files are stored, they have to be stored in the same folder with the images. Otherwise, they won't have any affect on the images. So you must have Camera Raw configured to save changes in the database, as has been explained.
When you open a raw file in the ACR plug-in, and make some adjustments, then either click Open Image or Done, the adjustments you've made are written to either the camera raw database or an XMP sidecar in the same folder as the raw file. If you click Cancel or hit the Esc key then the ACR panel will be closed without writing the settings anywhere although previous settings could be wherever you have them configured to have been written.
The settings go to the camera raw database if you have that setting enabled in the ACR preferences or if the location the raw files are stored is readonly, such as a CD/DVD or external or network rive with only read permissions; otherwise, the settings are in an XMP in the same folder as the raw file.
If you're editing TIFs or PSDs or JPGs then there is no XMP sidecar as the settings can be written inside the header of the image files, themselves.
yes I do have these settings in ACR Preference, it is set to XML sidecar files, still does not help.
The problem I am facing is when editing within a photoshop smartobject. Then the RAW file and the settings is somehow stored within the smartobject PSD file.
The point with smartobject editing is to enable non destructive editing. I can go back all the way into the RAW file and make adjustments if I need to.
Now I want to export these settings from the RAW file within the smartobject to apply on other RAW files. But the XML file is not stored anywhere..
But also when trying to edit in a normal way (no smartobject), I am unable to export the camera RAW XML file.
Even if I delete every XML sidecar file I have, and choose to export camera RAW settings from edits done on a file, nothing happens.
No XML file is stored anywhere, on either Mac or Windows.
As you have surmised, once a smart object you can no longer create an xml, the data is contained within the psd file. About the best you can do is save out as a dng from within ACR, as far as I can tell that retains the raw data and adjustments made to the smart object within Photoshop.
Richard, thanks for the tips.
I tried to save as DNG from ACR, but I was still unable to "export to XMP"..
Then I just tried "Save settings" from same menu as "export to XMP" in ACR, and then ACR saved the XMP file..
I also tried this directly from within a smartobject PSD file, and yes it exports the XMP file when choosing "Save settings"
Wish I tried this earlier.
Now I am trying to understand what function the "export to XMP" has, since it obviously does not do what it says, and since the exporting to XMP is done from another choice "Save settings". Seem like Adobe can delete the "export to XMP" selection from ACR.
Well, problem solved it seem.
The settings are saved as a preset than can later be applied to other images, but they are not associated with a particular image, unlike the xmp files generated from ACR outside of smart objects. I believe the settings are normally saved in the ACR database, and one can export to a xmp file for movement to another computer, not sure how why the xmp is generated automatically.
The xmp files are text based, you can open them in a text editor and gain an appreciation for what is stored.
Added by edit - the settings files are stored in the Camera Raw folder under user data, in Windows c:\users\xxname\appdata\roaming\adobe\cameraraw\settings. Still not sure what Export to XMP does.
Added by second edit - found some Adobe help on export:
"If you store the camera raw settings in the Camera Raw database and plan to move the files to a different location (CD, DVD, another computer, and so forth), you can use the Export Settings To XMP command to export the settings to sidecar XMP files."
If you're not using the database option, then I assume this command will produce no new XMP files, at least it didn't for me.