Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
[This is preliminary documentation and is subject to change.]
Writes the full Xml content of the Ept document to the supplied System.IO.Stream using the default UTF-8 encoding.
Namespace: ContentStudio.Document.EPT
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
Parameters
- output
- Type: System.IOStream
A System.IO.Stream to write to.
Remarks
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. |
Examples
The following code sample shows how to write xml to a string
private string GetXml(EPTXmlTextParser ept) { using (System.IO.MemoryStream ms = new System.IO.MemoryStream()) { ept.Write(ms); ms.Position = 0; System.IO.StreamReader sr = new System.IO.StreamReader(ms); return sr.ReadToEnd(); } }
See Also