Show / Hide Table of Contents

Method TreeBase-1.XmlLoad(+ 1 overload)


Overload

Loads XML file and creates tree of nodes from it.

protected static T XmlLoad(string file, TreeBase<T>.XmlNodeReader nodeReader)
Parameters
file  (string)

XML file. Must be full path. Can contain environment variables etc, see pathname.expand.

nodeReader  (TreeBase<T>.XmlNodeReader)

Callback function that reads current XML element and creates/returns new node. See example.

Returns
T

the root node.

Exceptions
ArgumentException

Not full path.

Exception

Exceptions of System.Xml.XmlReader.Create.

XmlException

An error occurred while parsing the XML.

Examples

TreeBase<T>


Overload(top)

Reads XML and creates tree of nodes.

protected static T XmlLoad(XmlReader x, TreeBase<T>.XmlNodeReader nodeReader)
Parameters
x  (XmlReader)
nodeReader  (TreeBase<T>.XmlNodeReader)

Callback function that reads current XML element and creates/returns new node.

Returns
T

the root node.

Exceptions
XmlException

An error occurred while parsing the XML.

Examples

TreeBase<T>