NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

XmlReader.WriteTo

Writes the current node to an XmlWriter.

[Visual Basic]
Public Sub WriteTo( _
   ByVal writer As XmlWriter _
)
[C#]
public void WriteTo(
   XmlWriter writer
);
[C++]
public: void WriteTo(
   XmlWriter* writer
);
[JScript]
public function WriteTo(
   writer : XmlWriter
);

Parameters

writer
[To be supplied.]

Remarks

The action performed by this method depends on the current node type as follows:

NodeType Action
StartTag Calls WriteStartTag and then repeatedly calls WriteAttr for each attribute.
EndTag Calls WriteEndTag.
Text Calls WriteText.
CData Calls WriteCData.
Comment Calls WriteComment.
PI Calls WritePI.
Header Calls WriteHeader.
DocType Calls WriteDocType.
BOF No action.
EOF No action.

The WriteTo method does not change the position of the reader.

Example

The following example copies one XML file to another, removing all comments and processing instructions in the process.



See Also

XmlReader Class | XmlReader Members | System.Xml Namespace