On the shield ,there are three XBee module interfaces and three COMMs. As we know,arduino mega 2560 has three additional serials port and XBee has a TX and RX. so my problem is that whether the three serial ports TXD0,RXD0,TXD1,RXD1,TXD2,RXD2 in the arduino are connected with the three XBees' serial port?
We miss the link to the hardware you are using. We don't like to have to guess what hardware exactly you are using just to find out that we didn't choose the right one. If you want to get some help provide the necessary information.