public function getTree($attr = NULL) { if (isset($this->_params)) { $tree = new xmlTree(); $text = new xmlNode("#text"); $this->_params[0]["title"] = iconv("windows-1251", "UTF-8", $this->_params[0]["title"]); $text->text($this->_params[0]["title"]); $title = new xmlNode("title"); $title->addChild($text); $tree->addChild($title); return $tree; } }
public function getTree($attr = NULL) { if (isset($this->_params)) { $tree = new xmlTree(); $text = new xmlNode("#text"); $text->text($this->_params[0]["dsc"]); $div = new xmlNode("div"); $div->addChild($text); $div->setAttribute("class", "error-dsc"); $tree->addChild($div); //echo $tree; die; return XMLDocument::buildTree("<div class=\"error-dsc\">{$this->_params[0]["dsc"]}</div>", XMLDocument::BUILD_MODE_FROM_TEXT); //return $tree; } else { return new xmlTree(); } }