I can understand the position operator in Dirac notation: $$\langle x'|\hat x|x''\rangle = \langle x'| x''|x''\rangle = x''\langle x'|x''\rangle = x'' \delta(x'-x'').$$ $\hat x$ is the position operator and the above equation is given by the eigenequation $$\hat x|x''\rangle=x''|x''\rangle.$$ But how to calculate the potential operator $\langle x'|V(\hat x)|x''\rangle$? In one quantum mechanics textbook it says $$\langle x'|V(\hat x)|x''\rangle=V(x'')δ(x'-x'').$$ But how to prove it directly?
(The $x'$ and $x''$ are the ordinal numbers of column and row of the matrix form of the operator in position representation)