C# Class SharpNeat.Utility.XmlIoUtils

Static helper methods for XML IO.
Datei anzeigen Open project: colgreen/sharpneat

Public Methods

Method Description
MoveToElement ( XmlReader xr, bool skipCurrent ) : string

Read from the XmlReader until we encounter an element. Return the Local name of the element or null if no element was found before the end of the input.

MoveToElement ( XmlReader xr, bool skipCurrent, string elemName ) : void

Read from the XmlReader until we encounter an element. If the name doesn't match elemName then throw an exception, else return normally.

ReadAttributeAsDouble ( XmlReader xr, string attrName ) : double

Read the named attribute and parse its string value as a double.

ReadAttributeAsDoubleArray ( XmlReader xr, string attrName ) : double[]

Read the named attribute and parse its string value as an array of doubles.

ReadAttributeAsInt ( XmlReader xr, string attrName ) : int

Read the named attribute and parse its string value as an integer.

ReadAttributeAsUInt ( XmlReader xr, string attrName ) : uint

Read the named attribute and parse its string value as a uint.

WriteAttributeString ( XmlWriter xw, string attrName, double arr ) : void

Writes a double array as a comma separated list of values.

Method Details

MoveToElement() public static method

Read from the XmlReader until we encounter an element. Return the Local name of the element or null if no element was found before the end of the input.
public static MoveToElement ( XmlReader xr, bool skipCurrent ) : string
xr XmlReader
skipCurrent bool
return string

MoveToElement() public static method

Read from the XmlReader until we encounter an element. If the name doesn't match elemName then throw an exception, else return normally.
public static MoveToElement ( XmlReader xr, bool skipCurrent, string elemName ) : void
xr XmlReader
skipCurrent bool
elemName string
return void

ReadAttributeAsDouble() public static method

Read the named attribute and parse its string value as a double.
public static ReadAttributeAsDouble ( XmlReader xr, string attrName ) : double
xr XmlReader
attrName string
return double

ReadAttributeAsDoubleArray() public static method

Read the named attribute and parse its string value as an array of doubles.
public static ReadAttributeAsDoubleArray ( XmlReader xr, string attrName ) : double[]
xr XmlReader
attrName string
return double[]

ReadAttributeAsInt() public static method

Read the named attribute and parse its string value as an integer.
public static ReadAttributeAsInt ( XmlReader xr, string attrName ) : int
xr XmlReader
attrName string
return int

ReadAttributeAsUInt() public static method

Read the named attribute and parse its string value as a uint.
public static ReadAttributeAsUInt ( XmlReader xr, string attrName ) : uint
xr XmlReader
attrName string
return uint

WriteAttributeString() public static method

Writes a double array as a comma separated list of values.
public static WriteAttributeString ( XmlWriter xw, string attrName, double arr ) : void
xw System.Xml.XmlWriter
attrName string
arr double
return void