public function __construct(XmlMarshaller $marshaller, $streamUri = null) { $this->marshaller = $marshaller; $this->streamUri = $streamUri; $this->cursor = new XmlWriter(); $this->initialize(); }