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
Afficher le fichier Open project: ngallagher/simplexml Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

GetNext() public méthode

public GetNext ( ) : InputNode
Résultat InputNode

GetNext() public méthode

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

InputElement() public méthode

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

IsElement() public méthode

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

IsEmpty() public méthode

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

IsRoot() public méthode

public IsRoot ( ) : bool
Résultat bool

Skip() public méthode

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

ToString() public méthode

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