C# Класс SimpleFramework.Xml.Stream.OutputDocument

The OutputDocument object is used to represent the root of an XML document. This does not actually represent anything that will be written to the generated document. It is used as a way to create the root document element. Once the root element has been created it can be committed by using this object.
Наследование: OutputNode
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Commit ( ) : void

This will commit this element and any uncommitted elements elements that are decendents of this node. For instance if any child or grand child remains open under this element then those elements will be closed before this is closed.

GetChild ( String name ) : OutputNode
GetPrefix ( ) : String

The default for the OutputDocument is null as it does not require a namespace. A null prefix is always used by the document as it represents a virtual node that does not exist and will not form any part of the resulting XML.

GetPrefix ( bool inherit ) : String
IsCommitted ( ) : bool

This is used to determine whether this node has been committed. This will return true if no root element has been created or if the root element for the document has already been commited.

IsRoot ( ) : bool
OutputDocument ( NodeWriter writer, OutputStack stack ) : System

Constructor for the OutputDocument object. This is used to create an empty output node object that can be used to create a root element for the generated document.

Remove ( ) : void

This is used to remove any uncommitted changes. Removal of an output node can only be done if it has no siblings and has not yet been committed. If the node is committed then this will throw an exception to indicate that it cannot be removed.

SetAttribute ( String name, String value ) : OutputNode

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

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

This will commit this element and any uncommitted elements elements that are decendents of this node. For instance if any child or grand child remains open under this element then those elements will be closed before this is closed.
public Commit ( ) : void
Результат void

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

public GetChild ( String name ) : OutputNode
name String /// This is the name of the child element to create. ///
Результат OutputNode

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

The default for the OutputDocument is null as it does not require a namespace. A null prefix is always used by the document as it represents a virtual node that does not exist and will not form any part of the resulting XML.
public GetPrefix ( ) : String
Результат String

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

public GetPrefix ( bool inherit ) : String
inherit bool /// If there is no explicit prefix then inherit. ///
Результат String

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

This is used to determine whether this node has been committed. This will return true if no root element has been created or if the root element for the document has already been commited.
public IsCommitted ( ) : bool
Результат bool

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

public IsRoot ( ) : bool
Результат bool

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

Constructor for the OutputDocument object. This is used to create an empty output node object that can be used to create a root element for the generated document.
public OutputDocument ( NodeWriter writer, OutputStack stack ) : System
writer NodeWriter /// This is the node writer to write the node to. ///
stack OutputStack /// This is the stack that contains the open nodes. ///
Результат System

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

This is used to remove any uncommitted changes. Removal of an output node can only be done if it has no siblings and has not yet been committed. If the node is committed then this will throw an exception to indicate that it cannot be removed.
public Remove ( ) : void
Результат void

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

public SetAttribute ( String name, String value ) : OutputNode
name String /// This is the name of the attribute to be added. ///
value String /// This is the value of the node to be added. ///
Результат OutputNode