Create a table containing the numerical results of FindRoot?

I am trying to create an array, or rather just a table, from the results of the root finding procedure, calculated with a set of input parameters. This is what I wrote:

pvec = {0.03, 0.06, 0.09, 0.12, 0.15}
 Xpvec = Table[0, 5]
While[n < 6, 
 FindRoot[1 - 3/(8 Xp^3) (2 Xp^2 - 1 + (1 + 2 Xp) Exp[-2 Xp]) == 
   pvec[[n]], {Xp, 0.01, 0.5}];
 xtemp = Xp /. %; Xpvec[[n]] = xtemp; i++]

But when I run this small piece, I got a number of error messages. On the other hand, if I specify any given value of n betweeen 1 and 5, and run the kernel of the While statement, it gives the correct result, so I can build my Xpved table manually. What is wrong with the While loop?

pvec = {0.03, 0.06, 0.09, 0.12, 0.15};
Xpvec = Table[0, 5]; n = 1;
While[n < 6,
fr = FindRoot[
1 - 3/(8 Xp^3) (2 Xp^2 - 1 + (1 + 2 Xp) Exp[-2 Xp]) ==
pvec[[n]], {Xp, 0.01, 0.5}];
xtemp = Xp /. fr; Xpvec[[n]] = xtemp; n++];
Xpvec

gives

{0.0408762, 0.0836014, 0.128334, 0.175253, 0.22456}

With Table code is shorter;

pvec = {0.03, 0.06, 0.09, 0.12, 0.15};
Table[Xp /. FindRoot[1 - 3/(8 Xp^3) (2 Xp^2 - 1 + (1 + 2 Xp) Exp[-2 Xp]) == 
pvec[[n]], {Xp, 0.01, 0.5}], {n, 1, 5}]

(* {0.0408762, 0.0836014, 0.128334, 0.175253, 0.22456} *)

Thank you for this solution, it indeed works.

Efficient and elegant, thanks a lot!