Dolfin/donflinx: how to use mesh.coordinates()in dolfinx

Hello,
I want to read the geometry information from a XDMF-file using dolfinx.

with dolfin it’s possible to read it using mesh.coordinates() and mesh.cells(),
but it doesn’t work in dolfinx because

'Mesh' object has no attribute 'cells'

so how can I read the endpoint coordinates of the cells in mesh with dolfinx?
with mesh.geometry.x in dolfinx I can read all the point of mesh, but how can I know then, which point belongs to one cell?

A mesh has a geometry and a topology.
The topology is the connectivity of vertices, into edges, facets, cells.

The geometry are all the nodes in the mesh (for linear meshes, this corresponds to the vertices).

To map a cell into the geometry, you can use dolfinx.mesh.entities_to_geometry, see for instance: Getting coordinates of facets in dolfinx - #2 by dokken

Note that DOLFINx has convenience functions such as: XDMFFile.read_topology_data and XDMFFile.read_geometry_data which reads data from xdmf in parallel, and is used for mesh creation: dolfinx/utils.py at baf4b6a6c0cdbc9349c9ab93263b1b66be6669e0 · FEniCS/dolfinx · GitHub