Xbee using xbee arduino shield cant talk to xbee dongle

Hello everyone,
I know even though this is not the forum for xbee, however i have asked in the forum already. The problem that i am facing is that whenever i want to send information from the xbee using the arduino xbee shield to the xbee dongle, it cant send out and receive information from both xbee dongle and the xbee arduino shield. I just put the xbee arduino shield on my arduino uno.
So if anyone know what the problem, can you guys please help.

The codes are as below.

/*****************************************************************
XBee_Serial_Passthrough.ino

Set up a software serial port to pass data between an XBee Shield
and the serial monitor.

Hardware Hookup:
The XBee Shield makes all of the connections you’ll need
between Arduino and XBee. If you have the shield make
sure the SWITCH IS IN THE “DLINE” POSITION. That will connect
the XBee’s DOUT and DIN pins to Arduino pins 2 and 3.

*****************************************************************/
// We’ll use SoftwareSerial to communicate with the XBee:
#include <SoftwareSerial.h>
// XBee’s DOUT (TX) is connected to pin 2 (Arduino’s Software RX)
// XBee’s DIN (RX) is connected to pin 3 (Arduino’s Software TX)
SoftwareSerial XBee(2, 3); // RX, TX

void setup()
{
// Set up both ports at 9600 baud. This value is most important
// for the XBee. Make sure the baud rate matches the config
// setting of your XBee.
XBee.begin(9600);
Serial.begin(9600);
}

void loop()
{
if (Serial.available())
{ // If data comes in from serial monitor, send it out to XBee
XBee.write(Serial.read());
}
if (XBee.available())
{ // If data comes in from XBee, send it out to serial monitor
Serial.write(XBee.read());
}
}

Code should work.... Do you know that one Xbee is master the other is slave they also has to be modifyed on spees and they has to know each other IDs... Did you figured them both?
Also you know that for sure that your RX TX pins in 2, 3 on the shied you can physically change them ....

So if anyone know what the problem, can you guys please help.

Sure. The problem is that your problem statement does not make sense. Try writing it again without using the word "it", since you never define what "it" is.

Post a picture of your setup or a block diagram. You seem to think that something should be talking to something, but it is not clear what those somethings are.

You need to post a link to your XBee shield. You need to post a link to your XBee dongle. You need to describe what kind of XBees you have, AND how you have configured them. If you bought into digi.com's crap about the XBees not needing to be configured, you deserve all the problems you are having.