[Overview][Classes][Procedures and functions][Index] Reference for unit 'Laz2_XMLCfg' (#lazutils)

TXMLConfig.ReadFromStream

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

Declaration

Source position: laz2_xmlcfg.pas line 106

public procedure TXMLConfig.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

TXMLConfig.Clear

  

Removes existing XML content in the Document property.

TXMLConfig.Document

  

XML document used for the class instance.

TXMLConfig.FreeDoc

  

Frees the TXMLDocument instance for the XML configuration file.

TXMLConfig.ReadXMLFile

  

Reads the XML content from the specified file into a TXMLDocument instance.

TXMLConfig.WriteToStream

  

Writes the XML content for the configuration file to the specified stream instance.

TXMLConfig.WriteXMLFile

  

Writes XML configuration data in Document to the specified file name.

ReadXMLFile

  

Reads the content of an XML file into the specified XML document.


Version 4.0 Generated 2025-05-03 Home