public function toString($str = '')
    {
        $str .= "<{$this->name} xmlns='{$this->ns}' ";
        foreach ($this->attrs as $key => $value) {
            if ($key !== 'xmlns') {
                $value = htmlspecialchars($value);
                $str .= "$key='$value' ";
            }
        }
        $str .= ">";
        foreach ($this->subs as $sub) {
            $str .= $sub->toString();
        }
        $body = htmlspecialchars($this->data);
        $str .= "$body</{$this->name}>";
        return $str;
    }
public function toString($str = '')
    {
        $str .= "<{$this->name} xmlns='{$this->ns}' ";
        foreach ($this->attrs as $key => $value) {
            if ($key !== 'xmlns') {
                $value = htmlspecialchars($value);
                $str .= "$key='$value' ";
            }
        }
        $str .= ">";
        foreach ($this->subs as $sub) {
            $str .= $sub->toString();
        }
        $body = htmlspecialchars($this->data);
        $str .= "$body</{$this->name}>";
        return $str;
    }
public function toString ( $ str = '' ) { $ str .= "<{$this->name} xmlns='{$this->ns}' " ; foreach ( $ this -> attrs as $ key => $ value ) { if ( $ key !== 'xmlns' ) { $ value = htmlspecialchars ( $ value ) ; $ str .= "$key='$value' " ; } } $ str .= ">" ; foreach ( $ this -> subs as $ sub ) { $ str .= $ sub -> toString ( ) ; } $ body = htmlspecialchars ( $ this -> data ) ; $ str .= "$body</{$this->name}>" ; return $ str ; }
Return this XML Object in xml notation

@param string $str
Return this XML Object in xml notation