The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



ReadFromXMLStream


Unit:SDL_kohonen
Class:TKohonen
Declaration:function ReadFromXMLStream (InStream: TStream; DataID: string): boolean;

The function ReadFromXMLStream reads the network parameters from the current position of the stream InStream. If the parameter DataID is empty, the first <kohonen> tag is evaluated and read into the network. If DataID is not empty, the entire rest of the stream is read until a <kohonen> tag is found whose attribute "id " matches DataID (the recognition of the "id " attribute is not case-sensitive). The function ReadFromXMLStream returns TRUE if both a valid starting tag <kohonen> and a valid end tag </kohonen> has been found and the Kohonen network has been updated.

Hint 1: The XML description of the network data has to follow a certain order: the size of the network and the number of input sensors have to precede all other data of the control.

Hint 2: ReadFromXMLStream is by a factor of 5 slower than ReadFromOpenXMLFile. Thus you should avoid to use ReadFromXMLStream when reading large networks with more than approx. 10000 cells (SizeX  x SizeY  x NrInSens).


Last Update: 2023-Dec-13