Sharing the connection, setting up IP's etc would work. File sharing would require some additional help.
Windows Me does include an ICS client I believe. Windows 98 does not.
If you want to share files betweem the two (and if ICS is not included on Me), put the XP install disk into the Me machine. From the other utilites or tools or something like that, run the network setup. This will install XP networking (including ICS) on the Me machine. Now the two would be able to share files properly (presuming your XP machine was not NTFS if memory servers) and ICS would work just fine.