Prime ideals and localisation of the global section ring of the structure sheaf Let $(X, \mathcal O_X)$ be a Noetherian scheme. Let $A=\mathcal O_X(X)$ be the global section ring. For every $x\in X$, let $\mathfrak m_x$ be the unique maximal ideal of the local ring $\mathcal O_{X,x}$ . 
I have two questions: 
(1) Let $x\in X$ and $j_x: A \to \mathcal O_{X,x}$ be the natural ring homomorphism. Consider the prime ideal $P_x=j_x^{-1} (\mathfrak m_x)$ of $A$. Is it true that $A_{P_x}  \cong \mathcal O_{X,x}$ as rings ?  (If this is not true in general, is it at least true when $x$ is a closed point ?) Is it at least true under some additional hypothesis on $X$ ? 
(2) With notation as in (1), we have a function $h: X \to $ Spec $(A)$ defined as $h(x)=P_x$ . Is $h$ continuous ? Is it injective ? Is it surjective ? What happens if we restrict $h$ only on the closed points of $X$ ? 
Note that for affine schemes the answer to both question is yes (and basically the map $h$ in (2) is the identity map) .
In general $h$ need not be injective since for say $X=\mathbb P^n_k$, where $k$ is a field, $\mathcal O(X)=k$ ... 
 A: *

*No, this is not true, not even for closed points. Consider $\Bbb P^1_k$. Then $A=k$ and $\mathcal{O}_{\Bbb P^1_k,pt}\cong k[t]_{(t)}$, and $j^{-1}$ of the maximal ideal is the zero ideal, so the requested localization of $A$ is just $A$, which is very far from $k[t]_{(t)}$. Certainly this will be an isomorphism if $X$ is quasiaffine - I don't see other good/easy conditions to add here which give you the same result.

*Yes, this is continuous - it's actually a morphism of schemes (locally on affine patches of $X$ it's specified by the inclusion of the global sections ring in to the ring of regular functions on that affine). It cannot be guaranteed to be either injective or surjective. You've already identified that it's not injective by the case of $\Bbb P^n_k$. To show it's not surjective, consider $\Bbb A^2_k$ with the origin removed. It's well known that this has ring of global functions $k[x,y]$, and the map $h:\Bbb A^2_k\setminus\{(0,0)\}\to \Bbb A^2_k$ is the natural inclusion, which misses the origin.
This map is often called the affinization map, if you're looking to search for more information about it.
