Let $(\Omega, \mathcal{F}, \mathbb{P})$ be a probability sapce and let $X: \Omega \to C^+(\mathbb{R})$ be a random variable taking values in the space of real valued non-negative continuous functions on the real line. I want to verify that the map $(\omega, x) \to X(\omega)(x)$ is measurable with respect to the product $\sigma$-algebra $\mathcal{F} \otimes \mathcal{B}(\mathbb{R})$. I do this in order to use Fubin's theorem to get
$$\mathbb{E}\left[\int_{\mathbb{R}}X(x)\mathrm{d}x \right] = \int_{\mathbb{R}}\mathbb{E}\left[X(x) \right]\mathrm{d}x.$$
My attempt: Follow proposition 1.13 on page 5 in Brownian Motion and Stochastic Calculus (Ioannis Karatzas and Steven E. Shreve), with the suitable adjustments to our case. For $x \in \mathbb{R}, \omega \in \Omega, n \geq 1$ and $k = -2^n + 1, ... -1, 0, 1, ... 2^n - 1$, define:
$$X^{(n)}(\omega)(x) = X(\omega)(\frac{k+1}{2^n}) \quad \text{ for } \quad \frac{k}{2^n} < x \leq \frac{k+1}{2^n}$$.
We get that $(\omega, x) \to X^{(n)}(\omega)(x)$ is measurable and converges to $(\omega, x) \to X(\omega)(x)$ as $n \to \infty$, hence this map is measurable and we are done. Is it true? I couldn't find a proper reference, and I think I'm correct but I'm not used to these kinds of proofs of measurability, so if someone could help and verify this it will be great.
If on $C^+(\Bbb R)$ you use the $\sigma$-field $\mathcal C$ generated by the coordinate projections $C^+(\Bbb R)\ni x\mapsto x(t)$, $t\in\Bbb R$, then your approximation argument does show that a random element $X$ mapping $(\Omega,\mathcal F)$ to $(C^+(\Bbb R),\mathcal C)$ does have the property that $(\omega,t)\mapsto X(\omega)(t)$ is $\mathcal F\otimes\mathcal B(\Bbb R)$ measurable. In particular, $X(t):\omega\to X(\omega)(t)$ is a real-valued random variable for each $t$. Of course, $t\mapsto X(\omega)(t)$ is "better than" Borel measurable for each $\omega$, being continuous.