Поделиться через


SetOutput

 

Sets the output stream for the writer.

Syntax

  
HRESULT SetOutput (IUnknown * pOutput);  

Arguments

pOutput
The output stream for the writer.

Return Value

Returns S_OK if no error is generated.

Remarks

IXmlWriter can accept several types of output stream:

A class derived from ISequentialStream
The writer will write the output to the provided ISequentialStream using the default UTF-8 encoding.

A class derived from IStream
The writer will write the output to the provided IStream using the default UTF-8 encoding.

IXmlWriterOutput
The writer will write the output to the stream and encoding specified by the IXmlWriterOutput object.

NULL
This resets the writer, releasing the previously set output object. This forces the writer to flush all the data into the stream, but does not force the stream itself to flush.

Use the Flush method to force the writer to write out all the buffered data to the output stream.

Requirements

Header: XmlLite.h

Library: XmlLite.lib

See Also

IXmlWriter Methods