placing objects on y axis depending on terrain level

Hello, newbie here.

I have a terrain which has some hills and valleys,
and i am reading through an XML file which tells me where on my terrain my objects are.

Now that works,
but I don’t know how to place them dynamically on the y axis depending on how high the terrain level is.

Any suggestions?

Terrain.activeTerrain.SampleHeight(transform.position);