C# Class SharpNeat.Utility.XmlIoUtils

Static helper methods for XML IO.
Afficher le fichier Open project: colgreen/sharpneat

Méthodes publiques

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

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

MoveToElement() public static méthode

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

ReadAttributeAsDouble() public static méthode

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

ReadAttributeAsDoubleArray() public static méthode

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
Résultat double[]

ReadAttributeAsInt() public static méthode

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

ReadAttributeAsUInt() public static méthode

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

WriteAttributeString() public static méthode

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