C# Class SimpleFramework.Xml.Stream.NodeBuilder

The NodeBuilder object is used to create either an input node or an output node for a given source or destination. If an InputNode is required for reading an XML document then a reader must be provided to read the content from.

If an OutputNode is required then a destination is required. The provided output node can be used to generate well formed XML to the specified writer.

Mostra file Open project: ngallagher/simplexml Class Usage Examples

Public Methods

Method Description
Read ( Stream source ) : InputNode

This is used to create an InputNode that can be used to read XML from the specified stream. The stream will be positioned at the root element in the XML document.

Read ( TextReader source ) : InputNode

This is used to create an InputNode that can be used to read XML from the specified reader. The reader will be positioned at the root element in the XML document.

Write ( TextWriter result ) : OutputNode

This is used to create an OutputNode that can be used to write a well formed XML document. The writer specified will have XML elements, attributes, and text written to it as output nodes are created and populated.

Write ( TextWriter result, Format format ) : OutputNode

This is used to create an OutputNode that can be used to write a well formed XML document. The writer specified will have XML elements, attributes, and text written to it as output nodes are created and populated.

Private Methods

Method Description
Read ( EventReader source ) : InputNode

This is used to create an InputNode that can be used to read XML from the specified reader. The reader will be positioned at the root element in the XML document.

Method Details

Read() public static method

This is used to create an InputNode that can be used to read XML from the specified stream. The stream will be positioned at the root element in the XML document.
public static Read ( Stream source ) : InputNode
source System.IO.Stream /// This contains the contents of the XML source. ///
return InputNode

Read() public static method

This is used to create an InputNode that can be used to read XML from the specified reader. The reader will be positioned at the root element in the XML document.
public static Read ( TextReader source ) : InputNode
source System.IO.TextReader /// This contains the contents of the XML source. ///
return InputNode

Write() public static method

This is used to create an OutputNode that can be used to write a well formed XML document. The writer specified will have XML elements, attributes, and text written to it as output nodes are created and populated.
public static Write ( TextWriter result ) : OutputNode
result System.IO.TextWriter /// This contains the result of the generated XML. ///
return OutputNode

Write() public static method

This is used to create an OutputNode that can be used to write a well formed XML document. The writer specified will have XML elements, attributes, and text written to it as output nodes are created and populated.
public static Write ( TextWriter result, Format format ) : OutputNode
result System.IO.TextWriter /// This contains the result of the generated XML. ///
format Format /// This is the format to use for the document. ///
return OutputNode