public static function getAttributesCollection($attributes, $padding=1) {
      /** one space to seperate namespace **/
      $attrs = str_repeat(" ", $padding);
      foreach ($attributes as $attr) {
        $attrs .= $attr->getKey() . "=" . '"' . $attr->getValue() . '" ';
      }

      return substr($attrs, 0, strlen($attrs) - 1);
    }