SyncronizedEPTDocumentWrite Method (Stream, Boolean, Encoding) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Writes the content of this Ept document to the specified output stream with an option to include changed fields only and a specific encoding.

Namespace: ContentStudio.Document.EPT
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)

public void Write(
	Stream output,
	bool changedFieldsOnly,
	Encoding encoding


Type: System.IOStream
The output stream to write to.
Type: SystemBoolean
if set to true only changed or added fields are included.
Type: System.TextEncoding
The encoding to use.

This method is new in Content Studio 5.2

Note Note
The caller must ensure that the stream is disposed after usage. No attempt is made to move the position of the stream when the writing is finished. For example; if a MemoryStream is used the stream will be at the end position after the write operation. The caller must set the position of the stream to the beginning in order to read its content in this case.

The following code sample shows how to write Ept-xml, with the default system encoding, that contains the changed fields only to a string

 private string GetXml(EPTXmlTextParser ept)
   using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
      ept.Write(ms, true, Encoding.Default);
      ms.Position = 0;
      System.IO.StreamReader sr = new System.IO.StreamReader(ms, Encoding.Default);
      return sr.ReadToEnd();
See Also