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

TXMLObjectWriter.WriteVariant

Serializes a Variant value using the XML format for the object writer.

Declaration

Source position: laz_xmlstreaming.pas line 91

public procedure TXMLObjectWriter.WriteVariant(

  const VarValue: Variant

); override;

Arguments

VarValue

  

Variant value serialized in the method.

Description

Supports the following variant types:

varEmpty
Stores 'nil' in the value attribute.
varNull
Stores 'null' in the value attribute.
varShortInt, varSmallInt, varInteger, varInt64
Calls WriteInteger to store the value attribute.
varQWord
Calls WriteUInt64 to store the value attribute.
varBoolean
Calls WriteBoolean to store the value attribute.
varCurrency
Calls WriteCurrency to store the value attribute.
varSingle
Calls WriteSingle to store the value attribute.
varDouble
Calls WriteFloat to store the value attribute.
varDate
Calls WriteDate to store the value attribute.
varOleStr, varString
Calls WriteWideString to store the value attribute.

Raises an EWriteError exception if any other variant type is encountered in the method.

Included when USE_NEW_READER_WRITER has been defined in the LCL.

Errors

Raises an EWriteError exception if any other variant type is encountered in the method.


Version 4.0 Generated 2025-05-03 Home