First of all there are "V" engines and Inline engines. The "V" engines have the pistons in a "V". The Inline engines have them in a line. Inline engines are more compact then "V" engines. See
http://auto.howstuffworks.com/engine.htm for more info on how engines work.
Yes, the xB engine is from the Echo and it is a Inline 4 and there is no way you could fit a V6 in that engine bay.
Both the Corolla and the Celica have Inline 4s, But they are bigger engines then the Echo/xB engine.
The Camry has an even bigger inline 4 engine and an option of a V6 engine.
BTW, A great site to look up car info is edmunds.com
It may be possible to swap a Corolla or Celica engine in a xB but it would not be easy. I would say $6000 or so, Not a very practical idea.