Do you have a new OEM seal or reproduction?
Remove the cap from the tank.
Remove the three screws from the bottom. Now you see that's not what holds the rubber on.
Here is the tech tip from another site:
Special Gas Cap Seal Replacement
I have done this on both the XS1100 and XS650. They are almost identical.
IMPORTANT! When you get this thing apart, you will find a tiny foam vent filter that goes on top of this mess. I am sure yours is rotten. If you do not replace it, you will run out of fuel on the first ride after seal replacement. You will be standing on the side of the road wondering why your bike quit. I have done three of them and I used a tiny piece of Scotch Brite to replace mine.
In the tech tip, they used a radiator cap seal. I keep my bikes, so I went with OEM since they are available. I won't be doing them over.