I am trying to programatically add some tags to a node's free tagging taxonomy field. Assuming that I have the following node structure,
<?php
$my_tag = 'test';
$node = (object) array(
  'type' => $node_type,
  'nid' => $row->nid,
  'vid' => $row->vid,
  'uid' => 1,
  'status' => $row->status,
  'language' => $row->language,
  'created' => $row->created,
  'changed' => $row->changed,
  'comment' => $row->comment,
  'promote' => $row->promote,
  'title' => $row->title,
  'teaser' => $row->teaser,
  'field_custom_tags' => //TODO add $my_tag to this free tagging taxonomy field
);
$node = node_submit($node);
node_save($node);
?>
