/**
  * This is method generate
  *
  * @param array $response
  *        	This is a description
  * @param mixed $status
  *        	This is a description
  * @param mixed $useAttrs
  *        	This is a description
  * @param mixed $stringOutput
  *        	This is a description
  * @return mixed This is the return value description
  */
 public static function generate(array $response = array(), $status = true, $useAttrs = true, $stringOutput = true, $lname = false, $iname = false)
 {
     $result = null;
     if ($lname !== false && $iname !== false) {
         $result = new Response(array($lname => array()), $status, $useAttrs);
         $xml = $result->xml->children();
         foreach ($response as $i => $item) {
             $result->appendResponse($xml, array($iname => $item));
         }
     } else {
         $result = new Response($response, $status, $useAttrs);
     }
     if ($stringOutput) {
         return $result->xml->asXml();
     } else {
         return $result->xml;
     }
 }