OK
How can I connect buttons to 1 XBee and how I could code this?
Buttons are usually sewn on. Switches are connected with wires.
If the XBee is connected to an Arduino, you probably want to connect the "buttons" to the Arduino, not the XBee.
Code what? Reading the state of the switch? Sending some data when the switch is pressed? When it becomes pressed? When it is released? When it becomes released? When the moon reaches full phase?
2X WiFi Shield
Two WiFi shields or two Wireless shields?
So, what part do you need help with?
It would be a good idea to modify your last post and make those "links" actual links. Select the text, and press the "Insert a link" icon - the 2nd one to the left of the green G.
We have an example with a button here: