Пример #1
0
 function html()
 {
     foreach ($this->stack as $e) {
         if (is_array($e)) {
             if ($e[3] == 'start') {
                 $o .= "<" . $e[1] . ($e[2] ? " " . xml_attrs_to_string($e[2]) : "") . ">";
             } elseif ($e[3] == 'end') {
                 $o .= "</" . $e[1] . ">";
             }
         } else {
             $o .= $e;
         }
     }
     return $o;
 }
Пример #2
0
 function strval()
 {
     //return var_export($this);
     return "<{$this->tag}" . xml_attrs_to_string($this->attribs) . ">" . $this->children_str() . "</{$this->tag}>";
 }