  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 $\mathcal{CO}$-bounded t.d.l.c. group $G$ of rational discrete
cohomological dimension less than or equal to $1$ must be isomorphic to the
fundamental group of a finite graph of profinite groups. This result
generalises Dunwoody's rational version 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 with rational discrete
cohomological dimension $1$ has necessarily non-positive Euler--Poincar\'e
characteristic (cf. Thm. G).
