No Buell X3, you're probably thinking of the S3, which was offered from 97 through 02. They did make an "X" model, the X1, which was available 99 through 02, but since you're talking 98, I assume you're talking about about an S3.
Regardless, it's almost a direct bolt-in. You'll have to push in the little inserts for the rear motor mount holes, as the Buell uses larger bolts with nuts attached. You'll also have to drill out your top front motor mount bracket since the Buell heads that year use 7/16 bolts and the Sportsters use 3/8 bolts. That's about it.
The 98 S3 motor is rated at 101hp (flywheel). Most of them made mid 80's or so. Whether or not you achieve that number with a stock 98 S3 motor in a Sportster depends much on the exhaust and air cleaner you use.