C# Class SimpleFramework.Xml.Stream.StreamReader

The StreamReader object provides an implementation for reading XML events using StAX. This will pretty much wrap core StAX events as the framework is very closely related. The implementation is basically required to ensure StAX events can be digested by the core reader. For performance this will match the underlying implementation closely as all this basically does is act as a means to adapt the underlying framework events.
Inheritance: EventReader
Mostrar archivo Open project: ngallagher/simplexml

Public Methods

Method Description
Attribute ( ) : Entry

This is used to convert the provided object to an attribute. The conversion process ensures the node can be digested by the core reader and used to provide an InputNode that can be used to represent an XML attribute within the source document.

Build ( Start node ) : Start

This is used to build the attributes that are to be used to populate the start event. Populating the start event with the attributes it contains is required so that each element will contain its associated attributes. Only attributes that are not reserved will be added to the start event.

Convert ( ) : EventNode
End ( ) : End

This is used to create an event to signify that an element has just ended. End events are important as they allow the core reader to determine if a node is still in context. This provides a more convenient way to use InputNode objects as they should only ever be able to extract their children.

Next ( ) : EventNode

This is used to take the next node from the document. This will scan through the document, ignoring any comments to find the next relevant XML event to acquire. Typically events will be the start and end of an element, as well as any text nodes.

Peek ( ) : EventNode

This is used to peek at the node from the document. This will scan through the document, ignoring any comments to find the next relevant XML event to acquire. Typically events will be the start and end of an element, as well as any text nodes.

Read ( ) : EventNode

This is used to read the next node from the document. This will scan through the document, ignoring any comments to find the next relevant XML event to acquire. Typically events will be the start and end of an element, as well as any text nodes.

Start ( ) : Start

This is used to convert the provided event to a start event. The conversion process ensures the node can be digested by the core reader and used to provide an InputNode that can be used to represent an XML elements within the source document.

StreamReader ( XmlReader reader ) : System.Collections.Generic

Constructor for the StreamReader object. This creates a reader that extracts events from the provided object. All StAX events returned from the provided instance will be adapted so that they can be digested by the core reader.

Text ( ) : Text

This is used to convert the provided event to a text event. The conversion process ensures the node can be digested by the core reader and used to provide an InputNode that can be used to represent an XML attribute within the source document.

Private Methods

Method Description
Close ( ) : End

This is used to create an event to signify that an element has just ended. End events are important as they allow the core reader to determine if a node is still in context. This provides a more convenient way to use InputNode objects as they should only ever be able to extract their children.

Open ( ) : Start

This is used to convert the provided event to a start event. The conversion process ensures the node can be digested by the core reader and used to provide an InputNode that can be used to represent an XML elements within the source document.

Value ( ) : Text

This is used to convert the provided event to a text event. The conversion process ensures the node can be digested by the core reader and used to provide an InputNode that can be used to represent an XML attribute within the source document.

Method Details

Attribute() public method

This is used to convert the provided object to an attribute. The conversion process ensures the node can be digested by the core reader and used to provide an InputNode that can be used to represent an XML attribute within the source document.
public Attribute ( ) : Entry
return Entry

Build() public method

This is used to build the attributes that are to be used to populate the start event. Populating the start event with the attributes it contains is required so that each element will contain its associated attributes. Only attributes that are not reserved will be added to the start event.
public Build ( Start node ) : Start
node Start
return Start

Convert() public method

public Convert ( ) : EventNode
return EventNode

End() public method

This is used to create an event to signify that an element has just ended. End events are important as they allow the core reader to determine if a node is still in context. This provides a more convenient way to use InputNode objects as they should only ever be able to extract their children.
public End ( ) : End
return End

Next() public method

This is used to take the next node from the document. This will scan through the document, ignoring any comments to find the next relevant XML event to acquire. Typically events will be the start and end of an element, as well as any text nodes.
public Next ( ) : EventNode
return EventNode

Peek() public method

This is used to peek at the node from the document. This will scan through the document, ignoring any comments to find the next relevant XML event to acquire. Typically events will be the start and end of an element, as well as any text nodes.
public Peek ( ) : EventNode
return EventNode

Read() public method

This is used to read the next node from the document. This will scan through the document, ignoring any comments to find the next relevant XML event to acquire. Typically events will be the start and end of an element, as well as any text nodes.
public Read ( ) : EventNode
return EventNode

Start() public method

This is used to convert the provided event to a start event. The conversion process ensures the node can be digested by the core reader and used to provide an InputNode that can be used to represent an XML elements within the source document.
public Start ( ) : Start
return Start

StreamReader() public method

Constructor for the StreamReader object. This creates a reader that extracts events from the provided object. All StAX events returned from the provided instance will be adapted so that they can be digested by the core reader.
public StreamReader ( XmlReader reader ) : System.Collections.Generic
reader XmlReader /// this is the reader used to parse the XML source ///
return System.Collections.Generic

Text() public method

This is used to convert the provided event to a text event. The conversion process ensures the node can be digested by the core reader and used to provide an InputNode that can be used to represent an XML attribute within the source document.
public Text ( ) : Text
return Text