C# Class SimpleFramework.Xml.Stream.InputAttribute

The InputAttribute is used to represent an attribute within an element. Rather than representing an attribute as a name value pair of strings, an attribute is instead represented as an input node, in the same manner as an element. The reason for representing an attribute in this way is such that a uniform means of extracting and parsing values can be used for inputs.
Inheritance: InputNode
Mostrar archivo Open project: ngallagher/simplexml Class Usage Examples

Public Methods

Method Description
GetAttribute ( String name ) : InputNode

Because the InputAttribute object represents an attribute this method will return null. If nodes are added to the node map the values will not be available here.

GetNext ( ) : InputNode
GetNext ( String name ) : InputNode
InputAttribute ( InputNode parent, Attribute attribute ) : System

Constructor for the InputAttribute object. This is used to create an input attribute using the provided name and value, all other values for this input node will be null.

InputAttribute ( InputNode parent, String name, String value ) : System

Constructor for the InputAttribute object. This is used to create an input attribute using the provided name and value, all other values for this input node will be null.

IsElement ( ) : bool

This is used to determine if this node is an element. This node instance can not be an element so this method returns false. Returning null tells the users of this node that any attributes added to the node map will be permenantly lost.

IsEmpty ( ) : bool

This is used to determine if this input node is empty. An empty node is one with no attributes or children. This can be used to determine if a given node represents an empty entity, with which no extra data can be extracted.

IsRoot ( ) : bool
Skip ( ) : void

This method is used to skip all child elements from this element. This allows elements to be effectively skipped such that when parsing a document if an element is not required then that element can be completely removed from the XML.

ToString ( ) : String

This is the string representation of the attribute. It is used for debugging purposes. When evaluating the attribute the to string can be used to print out the attribute name.

Method Details

GetAttribute() public method

Because the InputAttribute object represents an attribute this method will return null. If nodes are added to the node map the values will not be available here.
public GetAttribute ( String name ) : InputNode
name String
return InputNode

GetNext() public method

public GetNext ( ) : InputNode
return InputNode

GetNext() public method

public GetNext ( String name ) : InputNode
name String /// this is the name of the next expected element ///
return InputNode

InputAttribute() public method

Constructor for the InputAttribute object. This is used to create an input attribute using the provided name and value, all other values for this input node will be null.
public InputAttribute ( InputNode parent, Attribute attribute ) : System
parent InputNode /// this is the parent node to this attribute ///
attribute Attribute /// this is the attribute containing the details ///
return System

InputAttribute() public method

Constructor for the InputAttribute object. This is used to create an input attribute using the provided name and value, all other values for this input node will be null.
public InputAttribute ( InputNode parent, String name, String value ) : System
parent InputNode /// this is the parent node to this attribute ///
name String /// this is the name for this attribute object ///
value String /// this is the value for this attribute object ///
return System

IsElement() public method

This is used to determine if this node is an element. This node instance can not be an element so this method returns false. Returning null tells the users of this node that any attributes added to the node map will be permenantly lost.
public IsElement ( ) : bool
return bool

IsEmpty() public method

This is used to determine if this input node is empty. An empty node is one with no attributes or children. This can be used to determine if a given node represents an empty entity, with which no extra data can be extracted.
public IsEmpty ( ) : bool
return bool

IsRoot() public method

public IsRoot ( ) : bool
return bool

Skip() public method

This method is used to skip all child elements from this element. This allows elements to be effectively skipped such that when parsing a document if an element is not required then that element can be completely removed from the XML.
public Skip ( ) : void
return void

ToString() public method

This is the string representation of the attribute. It is used for debugging purposes. When evaluating the attribute the to string can be used to print out the attribute name.
public ToString ( ) : String
return String