C# Class SimpleFramework.Xml.Stream.InputElement

The InputElement represents a self contained element that will allow access to its child elements. If the next element read from the NodeReader is not a child then this will return null. The input element node also allows the attribute values associated with the node to be accessed.
Inheritance: InputNode
Mostrar archivo Open project: ngallagher/simplexml Class Usage Examples

Public Methods

Method Description
GetAttribute ( String name ) : InputNode

Provides an attribute from the element represented. If an attribute for the specified name does not exist within the element represented then this method will return null.

GetNext ( ) : InputNode
GetNext ( String name ) : InputNode
InputElement ( InputNode parent, NodeReader reader, EventNode node ) : System

Constructor for the InputElement object. This is used to create an input node that will provide access to an XML element. All attributes associated with the element given are extracted and exposed via the attribute node map.

IsElement ( ) : bool

This is used to determine if this node is an element. This allows users of the framework to make a distinction between nodes that represent attributes and nodes that represent elements. This is particularly useful given that attribute nodes do not maintain a node map of attributes.

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 element. It is used for debugging purposes. When evaluating the element the to string can be used to print out the element name.

Method Details

GetAttribute() public method

Provides an attribute from the element represented. If an attribute for the specified name does not exist within the element represented then this method will return null.
public GetAttribute ( String name ) : InputNode
name String /// this is the name of the attribute to retrieve ///
return InputNode

GetNext() public method

public GetNext ( ) : InputNode
return InputNode

GetNext() public method

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

InputElement() public method

Constructor for the InputElement object. This is used to create an input node that will provide access to an XML element. All attributes associated with the element given are extracted and exposed via the attribute node map.
public InputElement ( InputNode parent, NodeReader reader, EventNode node ) : System
parent InputNode /// this is the parent XML element for this ///
reader NodeReader /// this is the reader used to read XML elements ///
node EventNode /// this is the XML element wrapped by this node ///
return System

IsElement() public method

This is used to determine if this node is an element. This allows users of the framework to make a distinction between nodes that represent attributes and nodes that represent elements. This is particularly useful given that attribute nodes do not maintain a node map of attributes.
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 element. It is used for debugging purposes. When evaluating the element the to string can be used to print out the element name.
public ToString ( ) : String
return String