Sign in Join
FPDoc Onlineexperiment

TXMLObjectWriter.WriteVariant procedure

Member of TXMLObjectWriterpublicIn unit Laz_XMLStreaming

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

Declaration

pascal
procedure 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.

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