Additionally, I restricted the respective nodes to the lattitude longitude for the Säntis region.
These ways are kept in a specific table:
With this table, I can now extract the lattitude/longitude pairs for each node in the relevant ways and write them into a kml file.
The algorithm basically boils down to:
Here's a screen shot of the result: