function tripal_pub_PMID_parse_pagination

2.x tripal_pub.PMID.inc tripal_pub_PMID_parse_pagination($xml, &$pub)
3.x tripal_chado.pub_importer_PMID.inc tripal_pub_PMID_parse_pagination($xml, &$pub)
1.x PMID.inc tripal_pub_PMID_parse_pagination($xml, &$pub)
1 call to tripal_pub_PMID_parse_pagination()
tripal_pub_PMID_parse_article in tripal_pub/includes/importers/PMID.inc

File

tripal_pub/includes/importers/PMID.inc, line 608
Tripal Pub PubMed Interface

Code

function tripal_pub_PMID_parse_pagination($xml, &$pub) {
  while ($xml->read()) {
    $element = $xml->name;

    if ($xml->nodeType == XMLReader::END_ELEMENT and $element == 'Pagination') {
      // we've reached the </Pagination> element so we're done.
      return;
    }
    if ($xml->nodeType == XMLReader::ELEMENT) {
      switch ($element) {
        case 'MedlinePgn':
          $xml->read();
          if (trim($xml->value)) {
            $pub['Pages'] = $xml->value;
          }
          break;
        default:
          break;
      }
    }
  }
}