Honda parts, if they are the same from year to year the part number will not change, however Honda quite often would make very small changes every year so seemingly identical parts would have different part numbers. A hypothetical example of this is a turn signal switch, Honda changed the bars on the new model 1/4" longer (or shorter), so the turn signal switch changed slightly as the wires are a slightly different length reflecting the change in bar length, another example is that one year the markings on the switch were white, the next year they changed to color to red, otherwise the switches are identical, but have differing part numbers. Could you use the parts interchangeably? Probably yes, would they be the exact parts? If the part number was different no, functionally ok? Maybe yes.
If you can get an old parts fiche for the last year the motorcycle was produced you can see what parts belong with what bike.
Use the recourse below you can look up parts year by year and see what's the same.
Motorcycle Parts|ATV Parts|Honda|Kawasaki|Suzuki|Yamaha|Dealer|Tires|Re pair Manuals|Wholesale Discount Prices
In that period Honda part numbers where three clusters - 90164-028-000 - 90164 is what the part is, the next set, 028, is what code for what the original bike it was for, the last three digits - 000- refer to modifications to the part or improvements, this depicts a 6 x 12 flat head screw, you'll see this part number alot on different motorcycles, it's used to hold the helmet holder to the frame on your XL-100, but you'll also find the same screw on a CB-750 with the same part number.
This site also has a reverse parts look up feature.