Writes the node found at the current position of the
specified System.Xml.XmlReader, and all
sub-nodes.
[Edit]
Parameters
- reader
- A System.Xml.XmlReader from which to copy the attributes.
[Edit]
- defattr
- A bool where true specifies to copy the default attributes from reader; otherwise, false.
[Edit]
Exceptions
Remarks
Example
The following example uses a System.Xml.XmlTextReader and
a System.Xml.XmlTextWriter to copy an XML file, specified in the command line, to the
console.
C# Example |
using System;
using System.Xml;
public class Copier {
public static void Main(string[] args) {
XmlTextReader xtReader = new XmlTextReader(args[0]);
XmlTextWriter xtWriter =
new XmlTextWriter(Console.Out);
xtWriter.WriteNode(xtReader, false);
xtWriter.Close();
xtReader.Close();
}
}
|
Requirements
Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0