Sign in Join
FPDoc Onlineexperiment

TXMLConfig.ReadFromStream procedure

Member of TXMLConfigpublicIn unit Laz2_XMLCfg

Reads the XML content in Document from the specified stream instance.

Declaration

pascal
procedure ReadFromStream(s: TStream)

Arguments

s

TStream instance with the XML content read in the method.

Description

ReadFromStream is a procedure used to read the XML content for the Document from the TStream instance in S. ReadFromStream calls FreeDoc to ensure that any existing XML content in the configuration file is discarded prior to loading values from the stream.

ReadFromStream calls the ReadXMLFile routine in the Laz2_XMLRead unit to load the XML content. If Document was not assigned in ReadXMLFile, the Clear method is called to create a Document with the correct default values.

Use ReadXMLFile to read XML content from a file on the local file system.

Use WriteToStream or WriteXMLFile to store XML content in the Document property to a stream or file.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.