code: public function getElementsByClassName($class)
      {
          if (strpos($class, '"') !== false
              || strpos($class, "'") !== false
          ) {
              return array();
          }
  
          $xpath = './/*[contains(concat(" ", @class, " "), " ' . htmlspecialchars($class) . ' ")]';
          return $this->xpath($xpath);
      }
docs: Return all elements with the given class name
  
  Should work like DOM0's method
  
  @param    string $class Class name
  @return    array                Array of SimpleDOM nodes