private function initialize() { if ($this->streamUri !== null) { $this->cursor->openUri($this->streamUri); } else { $this->cursor->openMemory(); } $this->cursor->startDocument($this->marshaller->getSchemaVersion(), $this->marshaller->getEncoding()); if ($this->marshaller->getIndent() > 0) { $this->cursor->setIndent((int) $this->marshaller->getIndent()); } }