You are here

function aggregator_element_data in Drupal 4

Same name and namespace in other branches
  1. 5 modules/aggregator/aggregator.module \aggregator_element_data()
  2. 6 modules/aggregator/aggregator.module \aggregator_element_data()
  3. 7 modules/aggregator/aggregator.parser.inc \aggregator_element_data()

Call-back function used by the XML parser.

1 string reference to 'aggregator_element_data'
aggregator_parse_feed in modules/aggregator.module

File

modules/aggregator.module, line 652
Used to aggregate syndicated content (RSS, RDF, and Atom).

Code

function aggregator_element_data($parser, $data) {
  global $channel, $element, $items, $item, $image, $tag;
  switch ($element) {
    case 'ITEM':
      $items[$item][$tag] .= $data;
      break;
    case 'IMAGE':
    case 'LOGO':
      $image[$tag] .= $data;
      break;
    case 'LINK':
      if ($data) {
        $items[$item][$tag] .= $data;
      }
      break;
    case 'CONTENT':
      $items[$item]['CONTENT'] .= $data;
      break;
    case 'SUMMARY':
      $items[$item]['SUMMARY'] .= $data;
      break;
    case 'TAGLINE':
    case 'SUBTITLE':
      $channel['DESCRIPTION'] .= $data;
      break;
    case 'INFO':
    case 'ID':
    case 'TEXTINPUT':

      // The sub-element is not supported. However, we must recognize
      // it or its contents will end up in the item array.
      break;
    default:
      $channel[$tag] .= $data;
  }
}