C# Class SimpleFramework.Xml.Stream.OutputAttribute

The OutputAttribute object is used to represent a node added to the output node map. It represents a simple name value pair that is used as an attribute by an output element. This shares its namespaces with the parent element so that any namespaces added to the attribute are actually added to the parent element, which ensures correct scoping.
Inheritance: OutputNode
Afficher le fichier Open project: ngallagher/simplexml

Méthodes publiques

Méthode Description
Commit ( ) : void

The commit method is used flush and commit any child nodes that have been created by this node. This allows the output to be completed when building of the XML document has been completed. If output fails an exception is thrown.

GetChild ( String name ) : OutputNode
GetPrefix ( ) : String
GetPrefix ( bool inherit ) : String
IsCommitted ( ) : bool

This is used to determine whether the node has been committed. If the node has been committed, then this will return true. When committed the node can no longer produce child nodes.

IsRoot ( ) : bool

This method is used to determine if this node is the root node for the XML document. The root node is the first node in the document and has no sibling nodes. This is false if the node has a parent node or a sibling node.

OutputAttribute ( OutputNode source, String name, String value ) : System

Constructor for the OutputAttribute object. This is used to create a simple name value pair attribute holder.

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
ToString ( ) : String

This is used to acquire the name and value of the attribute. Implementing this method ensures that debugging the output node is simplified as it is possible to get the actual value.

Method Details

Commit() public méthode

The commit method is used flush and commit any child nodes that have been created by this node. This allows the output to be completed when building of the XML document has been completed. If output fails an exception is thrown.
public Commit ( ) : void
Résultat void

GetChild() public méthode

public GetChild ( String name ) : OutputNode
name String /// this is the name of the child element to create ///
Résultat OutputNode

GetPrefix() public méthode

public GetPrefix ( ) : String
Résultat String

GetPrefix() public méthode

public GetPrefix ( bool inherit ) : String
inherit bool /// if there is no explicit prefix then inherit ///
Résultat String

IsCommitted() public méthode

This is used to determine whether the node has been committed. If the node has been committed, then this will return true. When committed the node can no longer produce child nodes.
public IsCommitted ( ) : bool
Résultat bool

IsRoot() public méthode

This method is used to determine if this node is the root node for the XML document. The root node is the first node in the document and has no sibling nodes. This is false if the node has a parent node or a sibling node.
public IsRoot ( ) : bool
Résultat bool

OutputAttribute() public méthode

Constructor for the OutputAttribute object. This is used to create a simple name value pair attribute holder.
public OutputAttribute ( OutputNode source, String name, String value ) : System
source OutputNode
name String /// this is the name that is used for the node ///
value String /// this is the value used for the node ///
Résultat System

Remove() public méthode

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
Résultat void

SetAttribute() public méthode

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 ///
Résultat OutputNode

ToString() public méthode

This is used to acquire the name and value of the attribute. Implementing this method ensures that debugging the output node is simplified as it is possible to get the actual value.
public ToString ( ) : String
Résultat String