original_string: private function startelement($parser, $name, $attrs) {
          $current = &$this->current;
          $level = &$this->level;
          if (!empty($name)) {
              if ($level == 0) {
                  $current[$level][$name] = array();
                  $current[$level][$name]["@"] = $attrs; // Attribute.
                  $current[$level][$name]["#"] = array(); // Other tags.
                  $current[$level + 1] = & $current[$level][$name]["#"];
                  $level++;
              } else {
                  if (empty($current[$level][$name])) {
                      $current[$level][$name] = array();
                  }
                  $siz = count($current[$level][$name]);
                  if (!empty($attrs)) {
                      $current[$level][$name][$siz]["@"] = $attrs; // Attribute.
                  }
                  $current[$level][$name][$siz]["#"] = array(); // Other tags.
                  $current[$level + 1] = & $current[$level][$name][$siz]["#"];
                  $level++;
              }
          }
      }
code: private function startelement($parser, $name, $attrs) {
          $current = &$this->current;
          $level = &$this->level;
          if (!empty($name)) {
              if ($level == 0) {
                  $current[$level][$name] = array();
                  $current[$level][$name]["@"] = $attrs; // Attribute.
                  $current[$level][$name]["#"] = array(); // Other tags.
                  $current[$level + 1] = & $current[$level][$name]["#"];
                  $level++;
              } else {
                  if (empty($current[$level][$name])) {
                      $current[$level][$name] = array();
                  }
                  $siz = count($current[$level][$name]);
                  if (!empty($attrs)) {
                      $current[$level][$name][$siz]["@"] = $attrs; // Attribute.
                  }
                  $current[$level][$name][$siz]["#"] = array(); // Other tags.
                  $current[$level + 1] = & $current[$level][$name][$siz]["#"];
                  $level++;
              }
          }
      }
code_tokens: private function startelement ( $ parser , $ name , $ attrs ) { $ current = & $ this -> current ; $ level = & $ this -> level ; if ( ! empty ( $ name ) ) { if ( $ level == 0 ) { $ current [ $ level ] [ $ name ] = array ( ) ; $ current [ $ level ] [ $ name ] [ "@" ] = $ attrs ; // Attribute. $ current [ $ level ] [ $ name ] [ "#" ] = array ( ) ; // Other tags. $ current [ $ level + 1 ] = & $ current [ $ level ] [ $ name ] [ "#" ] ; $ level ++ ; } else { if ( empty ( $ current [ $ level ] [ $ name ] ) ) { $ current [ $ level ] [ $ name ] = array ( ) ; } $ siz = count ( $ current [ $ level ] [ $ name ] ) ; if ( ! empty ( $ attrs ) ) { $ current [ $ level ] [ $ name ] [ $ siz ] [ "@" ] = $ attrs ; // Attribute. } $ current [ $ level ] [ $ name ] [ $ siz ] [ "#" ] = array ( ) ; // Other tags. $ current [ $ level + 1 ] = & $ current [ $ level ] [ $ name ] [ $ siz ] [ "#" ] ; $ level ++ ; } } }
docstring: Is called when tags are opened.
  
  Note: Used by xml element handler as callback.
  
  @author Kilian Singer
  @param resource $parser The XML parser resource.
  @param string $name The XML source to parse.
  @param array $attrs Stores attributes of XML tag.
docstring_tokens: Is called when tags are opened .