That is not straight forward. Using xdmf the result is stored as a vertex function and not with the regular function space. As long as you are still using a CG 1 space, though, it can be retrieved quite easily like this:
# Need the h5py module
import h5py
# Create a Function to read the solution into
u0 = Function(V)
# Open the result file for reading
fl = h5py.File("u_file.h5", "r")
# Choose the first time step
vec = fl["/VisualisationVector/0"]
# Scalar FunctionSpace Q is required for mapping vertices to dofs
Q = FunctionSpace(mesh, 'CG', 1)
q = Function(Q)
v2d = vertex_to_dof_map(Q)
# Now map vertexfunction to the V function space
for i in range(2):
q.vector()[v2d] = vec[:, i]
assign(u0.sub(i), q)