unable to receive and program into my arduino Mini

I am doing a wireless transmission, i recently bought a Xbee usb adapter. my transmission and receive between my Xbee usb adapter and my xbee shield is successful but my purpose is for my xbee shield to transmit a signal to my Xbee usb adapter then through the wire RX and TX i configure my arduino Mini. i not sure whether is my coding wrong?

coding :

long BaudRate = 9600;
int motorPin = 9;
int gotchar = 0;

void setup(void) {
Serial.begin(9600);
pinMode(motorPin, OUTPUT); //initialize pin 9 for the vibrator motor

}
void loop(void) 
{
while (Serial.available()>0){
char gotChar = Serial.read();
//recieving 
if (gotChar == 'H'){
digitalWrite(motorPin, HIGH); //receiving a 'H' char to enable the motor to move
delay(2000);
}


else if (gotChar == 'L'){
digitalWrite(motorPin, LOW); //receiving a 'L' char to off the motor 
delay(2000);
}
}
}

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

If you are not using an XBee shield, and you aren't with a Mini, then do NOT connect the XBee to the hardware serial port. Leave that for debugging. Use SoftwareSerial to create a software serial port that you connect the XBee to.