Skip to Main Content
C# in a Nutshell, Second Edition
book

C# in a Nutshell, Second Edition

by Peter Drayton, Ben Albahari, Ted Neward
August 2003
Intermediate to advanced content levelIntermediate to advanced
928 pages
32h 1m
English
O'Reilly Media, Inc.
Content preview from C# in a Nutshell, Second Edition

Name

XmlTextWriter

Synopsis

This class adds basic formatting to the text output and is derived from XmlWriter. The Formatting property uses its values to indicate if the output is to be Indented (None is the default). If Formatting is set to Formatting.Indented, the value of the Indentation property is the number of characters to indent each successive level (or child element) in the output. IndentChar sets the character to use for indentation, which must be a valid whitespace character (the default is space). QuoteChar is the character to use to quote attributes and is either a single or double quote.

public class XmlTextWriter : XmlWriter {
// Public Constructors
   public XmlTextWriter(System.IO.Stream w, System.Text.Encoding encoding);
   public XmlTextWriter(string filename, System.Text.Encoding encoding);
   public XmlTextWriter(System.IO.TextWriter w);
// Public Instance Properties
   public Stream BaseStream{get; }
   public Formatting Formatting{set; get; }
   public int Indentation{set; get; }
   public char IndentChar{set; get; }
   public bool Namespaces{set; get; }
   public char QuoteChar{set; get; }
   public override WriteState WriteState{get; }       
// overrides XmlWriter
   public override string XmlLang{get; } 
// overrides XmlWriter
   public override XmlSpace XmlSpace{get; }           
// overrides XmlWriter
                  // Public Instance Methods
   public override void Close( );         
// overrides XmlWriter
   public override void Flush( );         
// overrides XmlWriter
   public override string LookupPrefix(string ns);   
// overrides XmlWriter ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# in a Nutshell

C# in a Nutshell

Ben Albahari, Ted Neward, Peter Drayton
C# 7.0 in a Nutshell

C# 7.0 in a Nutshell

Joseph Albahari, Ben Albahari
C# Cookbook, 2nd Edition

C# Cookbook, 2nd Edition

Jay Hilyard, Stephen Teilhet
C# Cookbook

C# Cookbook

Joe Mayo

Publisher Resources

ISBN: 0596005261Catalog PageErrata