You are here

public function EndNoteXMLParser::endnote7_startElement in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/endnote/endnote_xml_parser.inc \EndNoteXMLParser::endnote7_startElement()
  2. 7.2 modules/endnote/endnote_xml_parser.inc \EndNoteXMLParser::endnote7_startElement()

File

modules/endnote/endnote_xml_parser.inc, line 380
endnote_xml_parser.inc

Class

EndNoteXMLParser

Code

public function endnote7_startElement($parser, $name, $attrs) {
  switch ($name) {
    case 'RECORD':
      $this->node = new stdClass();
      $this->node->biblio_contributors = array();

      // We set 102 here because the xml parser won't.
      $this->node->biblio_type = 102;

      // Process a value of 0 (ZERO) which is the
      // ref-type 102. if there is a non-zero value it will be overwritten.
      $this->element = '';
      break;
    case 'AUTHORS':
    case 'SECONDARY_AUTHORS':
    case 'TERTIARY_AUTHORS':
    case 'SUBSIDIARY_AUTHORS':
      $this->contrib_count = 0;
      $this->contributors = array();
      break;
    case 'AUTHOR':
    case 'SECONDARY_AUTHOR':
    case 'TERTIARY_AUTHOR':
    case 'SUBSIDIARY_AUTHOR':
      $this->contributors[$this->contrib_count]['name'] = '';
      $this->element = $name;
      break;
    case 'KEYWORDS':
      $this->keyword_count = 0;
      break;
    case 'KEYWORD':
      $this->node->biblio_keywords[$this->keyword_count] = '';
      $this->element = $name;
      break;
    default:
      $this->element = $name;
  }
}