protected function DefaultParser::elementEnd

XML parser callback: Perform an action when a closing tag is encountered.

Parameters

resource $parser: A reference to the XML parser calling the handler.

string $name: The name of the element for which this handler is called.

array $attributes: An associative array with the element's attributes (if any).

File

drupal/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/parser/DefaultParser.php, line 268
Contains \Drupal\aggregator\Plugin\aggregator\parser\DefaultParser.

Class

DefaultParser
Defines a default parser implementation.

Namespace

Drupal\aggregator\Plugin\aggregator\parser

Code

protected function elementEnd($parser, $name) {
  switch ($name) {
    case 'image':
    case 'textinput':
    case 'item':
    case 'entry':
    case 'info':
      $this->element = '';
      break;
    case 'id':
    case 'content':
      if ($this->element == $name) {
        $this->element = '';
      }
  }
}