/**
  * Diese Methode erzeugt aus einem XML-Element die Modulobjekte
  *
  * @param SimpleXMLElement $xml XML-Definition
  * @return Module Das erzeugte Modul
  *
  */
 public function createByXml(SimpleXMLElement $xml, $directory)
 {
     $module = new Module();
     $module->name = (string) $xml['name'];
     $module->version = (string) $xml->version;
     $module->description = (string) $xml->description;
     $module->author = (string) $xml->author;
     $module->image = (string) $xml->image;
     $module->namespace = (string) $xml->namespace;
     $module->path = $directory;
     $module->qualifiedName = (string) $xml->qualifiedName;
     if ($module->qualifiedName === '') {
         $module->qualifiedName = $module->name;
     }
     // Model
     $module->model = Model::createByXml($module, $xml->model);
     // Aktionen
     foreach ($xml->actions->action as $action) {
         $module->actions[(string) $action['name']] = Action::createByXml($action, $module);
     }
     $module->init();
     return $module;
 }