+
+ function createCOMElement($module, $attributes) {
+ $com_elem = $this->createElementNS(COM_NS, $module);
+ if (is_array($attributes) && count($attributes)) {
+ foreach ($attributes as $name=>$value) {
+ $com_elem->setAttribute($name, $value);
+ }
+ }
+ return $com_elem;
+ }