PHPDaemon\XMLStream\XMLStreamObject::printObj PHP Method

printObj() public method

Dump this XML Object to output.
public printObj ( integer $depth )
$depth integer
    public function printObj($depth = 0)
    {
        $s = str_repeat("\t", $depth) . $this->name . " " . $this->ns . ' ' . $this->data . "\n";
        foreach ($this->subs as $sub) {
            $s .= $sub->printObj($depth + 1);
        }
        return $s;
    }