Pls help with my sketch about sending commands form PC to XBee

I would like to send commands form my pc to uno through XBee to control things.
now I have some problems with programming.
could you please tell me what is wrong with my sketch below.

#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);
  pinMode(12,OUTPUT);
}

void loop()
{ // In loop() we continously check to see if a command has been
  //  received.
  if (XBee.available())
  { // If data comes in from PC, send it out to serial monitor
    Serial.write(XBee.read());
    
   char temp = XBee.read();
   
   switch (temp)
   {
     case '1':
     LedOn();
     break;
     
     case '2':
     LedOff();
     break;
     
     case '3':
     blink1();
     break;
     
     default :
     blink1();
     Serial.println("not receiving data");
     break;
     
   }
  }
}

void LedOn()
{
 digitalWrite(12,HIGH);
 delay(5000);
 digitalWrite(12,LOW); 
}

void LedOff(){
  digitalWrite(12,LOW);
}

void blink1(){
 digitalWrite(12,HIGH);
 delay(10000);
 digitalWrite(12,LOW);
 delay(1000);
}

could you please tell me what is wrong with my sketch below.

Are you kidding?
The sketch does something. You didn't explain what it does.
You expect it to do something. You didn't explain what.
You are using some XBees. You didn't explain what kind, how they are configured, or how they are connected to the PC and Arduino.
And you expect us to use our crystal balls to determine what is wrong. No can do. Mine are brass.