Get wkt of an OSM feature

Given any OSM feature (e.g. a relation, how do I get its current wkt?

(note: someone may have edited it 5 mins ago, and I would like to its current wkt…)

One way is to use this api call:

Thanks! That api is helpful! It gives a xml, any quick idea on how to convert xml into wkt?