It is shown that a Stallings-Swan theorem holds in a totally disconnected locally compact (= t.d.l.c.) context (cf. Thm. B). More precisely, a compactly generated CO-bounded t.d.l.c. group G of rational discrete cohomological dimension less or equal to 1 must be isomorphic to the fundamental group of a finite graph of profinite groups. This result generalizes Dunwoody's rational version (cf. Thm. A) of the classical Stallings-Swan theorem to t.d.l.c. groups. The proof of Theorem B is based on the fact that a compactly generated unimodular t.d.l.c. group G with rational discrete cohomological dimension 1 has necessarily non-positive Euler-Poincaré characteristic (cf. Thm. G).