function tripal_pub_PMID_parse_journal
2.x tripal_pub.PMID.inc | tripal_pub_PMID_parse_journal($xml, &$pub) |
3.x tripal_chado.pub_importer_PMID.inc | tripal_pub_PMID_parse_journal($xml, &$pub) |
1.x PMID.inc | tripal_pub_PMID_parse_journal($xml, &$pub) |
1 call to tripal_pub_PMID_parse_journal()
- tripal_pub_PMID_parse_article in tripal_pub/
includes/ importers/ PMID.inc
File
- tripal_pub/
includes/ importers/ PMID.inc, line 633 - Tripal Pub PubMed Interface
Code
function tripal_pub_PMID_parse_journal($xml, &$pub) {
while ($xml->read()) {
$element = $xml->name;
if ($xml->nodeType == XMLReader::END_ELEMENT and $element == 'Journal') {
return;
}
if ($xml->nodeType == XMLReader::ELEMENT) {
switch ($element) {
case 'ISSN':
$issn_type = $xml->getAttribute('IssnType');
$xml->read();
$issn = $xml->value;
$pub['ISSN'] = $issn;
if ($issn_type == 'Electronic') {
$pub['eISSN'] = $issn;
}
if ($issn_type == 'Print') {
$pub['pISSN'] = $issn;
}
break;
case 'JournalIssue':
// valid values of cited_medium are 'Internet' and 'Print'
$cited_medium = $xml->getAttribute('CitedMedium');
tripal_pub_PMID_parse_journal_issue($xml, $pub);
break;
case 'Title':
$xml->read();
$pub['Journal Name'] = $xml->value;
break;
case 'ISOAbbreviation':
$xml->read();
$pub['Journal Abbreviation'] = $xml->value;
break;
default:
break;
}
}
}
}