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
파일 보기 프로젝트 열기: ngallagher/simplexml 1 사용 예제들

공개 메소드들

메소드 설명
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