How to get the itemUUID and IVersionableHandle object of the particular (XML)file
Accepted answer
If you have the workspace loaded, and want to find a particular file (by path) you can use ISharingManager#findShareable(). This returns an IShareable, and you can use IShareable#getVersionable() to get the IVersionableHandle (if the file is actually a shared file). Also #getItemId() on the versionable would return the item UUID.
Comments
Hello Mr.David
Can you provide me one simple example to get Ishareable object using ISharingManager#findShareable().
This was not tested, but it should be something like:
IShareable shareable = FileSystemCore.getSharingManager().findShareable(new PathLocation("C:/someDir/someDir2/fileA.xml"), ResourceType.FILE);
IVersionableHandle fileHandle = shareable.getVersionable(progress); // Note: 'progress' here is an IProgressMonitor. This method should be run on a background thread and be passed in a progress monitor.
UUID fileUUID = item.getItemId();