This document is archived and information here might be outdated.  Recommended version.


IXMLWriter.WriteTo Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Interfaces > IX > IXMLWriter Interface > IXMLWriter.WriteTo Method
ArcGIS Developer Help

IXMLWriter.WriteTo Method

Specifies output XML stream.

[Visual Basic .NET]
Public Sub WriteTo ( _
    ByVal outputStream As IStream _
)
[C#]
public void WriteTo (
    IStream outputStream
);
[C++]
HRESULT WriteTo(
  IStream* outputStream
);
[C++]
Parameters
outputStream [in]

outputStream is a parameter of type IStream*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks


The WriteTo method specifies the output XML stream. XMLStream lets you write/read (in our case write) xml data to stream object.

For Example:

Dim pWriter As IXMLWriter
Set pWriter = New XMLWriter

Dim pXMLStream as IXMLStream
Set pXMLStream = new XMLStream

'*** This sets output to XML Stream ***
pWriter.WriteTo pStream

'*** Write some xml to the stream ***
pWriter.WriteXMLDeclaration

'*** Save stream to the file ***
pXMLStream.SaveToFile App.Path & "\new.xml"

See Also

IXMLWriter Interface