function biblio_pm_xml_biblio_import in Bibliography Module 7.2
Same name and namespace in other branches
- 6.2 modules/pubmed/biblio_pm.module \biblio_pm_xml_biblio_import()
- 7 modules/pubmed/biblio_pm.module \biblio_pm_xml_biblio_import()
File
- modules/
pubmed/ biblio_pm.module, line 177
Code
function biblio_pm_xml_biblio_import($file, $terms = array(), $batch = FALSE, $session_id = NULL) {
libxml_use_internal_errors(true);
$xml = @simplexml_load_file($file->uri);
if (empty($xml) || isset($xml->body->pre->ERROR)) {
drupal_set_message("Could not parse file as PubMed XML", 'error');
return;
}
return _biblio_pm_create_node_from_xml($xml, $terms, $batch, $session_id);
}