HI. i am working on a project to import xml contents into drupal 7. i have parsed all the data in php. so far i have been succeded in importing node body and its title. There is no documentation for drupal 7 on how to attach image to the node and tags. i really need help i have spend two days finding it tried a lot. i will be very thank you for someone. please just guide me somewhere
function make_nodes($nodes) {
$new_node = $nodes[0];
$node = new stdClass();
$node->title = $new_node['title'];
$node->body['und'][0]['value'] = $new_node['body'];
$node->type = 'article';
$node->created = $new_node['timestamp'];
$node->changed = $new_node['timestamp'];
$node->status = 1;
$node->promote = 1;
$node->sticky = 0;
$node->body['und'][0]['format'] = 1;
$node->uid = (isset($local_user->uid) && !empty($local_user->uid)?$local_user->uid:1);
$node->language = 'en';
$node->timestamp = $new_node['timestamp'];
$node->revision = 0;
node_submit($node);
node_save($node);
}