Get taxonomy term ID in node I have the following content types: hotels, and taxonomy terms; in hotels I have a taxonomy field. 

How do I retrieve the taxonomy term ID in a node? Is it possible to retrieve the self and parent taxonomy term ID and name? 

I have also tried this, but it does not work.
You can use field_get_items(), which returns you the value of a field in the language they would be displayed, or in the language whose code is passed as argument to the function. Generally, you are interested to the field's value in the language that would be used to show the field, and you don't pass any language code to the function.

$items = field_get_items('node', $node, $field_name);


$node contains the node object, and $field_name the name of the taxonomy term field.

What returned in $items is an array containing (possibly) multiple values; each value is an array containing the "tid" index, and the term ID. For a taxonomy term for which users can enter more than a value, this is what the function returns.