You are here

function biblio_pm_biblio_xml_import in Bibliography Module 6

1 call to biblio_pm_biblio_xml_import()
biblio_import in ./biblio.import.export.inc
Import data from a file and return the node ids created.

File

pubmed/biblio_pm.module, line 102

Code

function biblio_pm_biblio_xml_import($file, $terms, $batch, $session_id) {
  libxml_use_internal_errors(true);
  $xml = @simplexml_load_file($file->filepath);
  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);
}