[out:json]; rel[“name”=“S8: Wiesbaden => Mainz Hbf => Hanau”]; out geom(49.987325, 8.237257, 50.035367, 8.318367);
Also, do a search for ‘JOSM relation sort’ which may help in simplifying the concatenating of the nodes.