Beispiel #1
0
 public function writeLeaf(Leaf $leaf, $level = null)
 {
     $newLine = $this->isPretty() ? $this->getNewLine() : '';
     $str = '';
     if ($leaf instanceof Document) {
         $str .= "<!DOCTYPE " . $leaf->getDocumentType() . ">" . $newLine;
     }
     return $str . parent::writeLeaf($leaf);
 }
Beispiel #2
0
 public function __clone()
 {
     parent::__clone();
     foreach ($this->_children as $i => $child) {
         $this->appendChild(clone $child);
     }
 }