Yes.
If you are not using a hub or a switch, and want to connect the W2K machine directly to the XP machine you must use a Crossover cable.
Be sure both machines are in the same IP range.
Now your machines must be able to ping eachother.
If applicable, also enable "Client for Microsoft Networks" and "File and printer sharing for Microsoft Networks".
HTH