If I remember correctly, if you were trying to install Windows XP from an upgrade CD, you don't have to install 98 first. You only need to have the 98 CD available when you install XP. It will ask you for a licensed product that allows for an upgrade.
Partly.................if you have the upgrade CD you will require a Microsoft CD of the qualifying product to be upgraded to do a clean install.

If you have an OEM recovery disk you will need to install the old OS first, then XP over the top.

If you have an XP retail CD you can do what you like.