Python recursive solution
99 characters (including spaces)
87 characters (without spaces)
def f(n,i=2,r=""):
while n%i<1:r+="%dx"%i;n/=i
return f(n,i+1,r)if n>1 else r
print f(input())[:-1]
Update:
A completely recursive version
def f(n,i=2,x=""): return x if n<2 else f(n,i+1,x)if n%i else f(n/i,i,x+'%dx'%i)
print f(input())[:-1]
Both versions are prone to stack overflows for all but the smallest of inputs.