The xbee gives you a serial stream over a wireless link. I don't see how you can drive a ping sensor from that without something sitting between the xbee and the ping sensor to receive from the serial stream and drive an I/O pin. There are plenty of wireless alternatives to xbee but it's impossible to know which ones might meet your need without knowing more about the distance you're trying to cover and what sort of environment you're in.
The ping sensor works off a high low combination, when the ping is powered to 5v its at high and then the xbee can somehow bring it low, by sending 0's?
its not much of a distance like 10 feet and its both indoors outdoors, doesn't matter.