C# Класс HandCoded.Xml.Writer.NestedWriter

The NestedWriter produces a formated XML document that uses indentation to show the structure of the information. If an element has attributes these are put on their own line to make them easy to read whilst a leaf element is formatted to enclose its value. For example: <?XML version="1.0" encoding="UTF-8"?> <root> <element attr="value"> <leaf>text</leaf;> <leaf/> </element> </root> </?XML>
Наследование: XmlWriter
Показать файл Открыть проект

Открытые методы

Метод Описание
NestedWriter ( Stream stream, Encoding encoding ) : System

Constructs a NestedWriter.

NestedWriter ( TextWriter writer ) : System

Constructs a NestedWriter.

ToString ( XmlDocument document ) : string

Converts a XmlDocument to a compact string representation.

Write ( XmlDocument document ) : void

Formats and writes the indicated XmlDocument to the output stream using the style implemented by the class instance.

Приватные методы

Метод Описание
Write ( XmlNode node, int level ) : void

Formats and writes the indicated XmlNode to the output stream using the style implemented by the class instance.

Описание методов

NestedWriter() публичный Метод

Constructs a NestedWriter.
public NestedWriter ( Stream stream, Encoding encoding ) : System
stream Stream The to write to.
encoding System.Text.Encoding The character encoding to use.
Результат System

NestedWriter() публичный Метод

Constructs a NestedWriter.
public NestedWriter ( TextWriter writer ) : System
writer System.IO.TextWriter The to write to.
Результат System

ToString() публичный статический Метод

Converts a XmlDocument to a compact string representation.
public static ToString ( XmlDocument document ) : string
document System.Xml.XmlDocument The to be converted.
Результат string

Write() публичный Метод

Formats and writes the indicated XmlDocument to the output stream using the style implemented by the class instance.
public Write ( XmlDocument document ) : void
document System.Xml.XmlDocument The to be formatted.
Результат void