TROSimpleXmlWriter

Overview

This class is used internally by the TROXmlRpcSerializer to serialize data for the XML-RPC message TROXmlRpcMessage.

Location

 

constructor Create

Creates a new instance.

constructor Create

Finished

Indicates whether the serialization of elements has finished.

property Finished: Boolean read

SaveToStream

If the serialization was finished, this method copies the content to the stream. Otherwise an exception is raised.

procedure SaveToStream(aDest: TStream)

Parameters:

  • aDest: Stream

WriteAnsiString

Writes an ANSI string, preserving XML specific symbols.

procedure WriteAnsiString(const aValue: ROAnsiString)

Parameters:

  • aValue: an ANSI string

WriteEndElement

Writes the supplied value as last element and finishes the serialization.

procedure WriteEndElement

WriteNil

Writes a Nil value.

procedure WriteNil

WriteStartElement

Writes the supplied value as first element. If the serialization was already finished, an exception is raised.

procedure WriteStartElement(const aElementName: string)

Parameters:

  • aElementName: Element name

WriteString (UnicodeString)  overload

Writes the supplied wide-string value in UTF-8 encoding.

procedure WriteString(const aValue: UnicodeString)

Parameters:

  • aValue: the supplied wide-string value in UTF-8 encoding.

WriteString (WideString)  overload

Writes the supplied wide-string value in UTF-8 encoding.

procedure WriteString(const aValue: WideString)

Parameters:

  • aValue: the supplied wide-string value in UTF-8 encoding.

WriteUTF8String

Writes the supplied string value in UTF-8 encoding.

procedure WriteUTF8String(const aValue: ROUTF8String)

Parameters:

  • aValue: the supplied string value in UTF-8 encoding.

 

Finished

Indicates whether the serialization of elements has finished.

property Finished: Boolean read

 

constructor Create

Creates a new instance.

constructor Create

SaveToStream

If the serialization was finished, this method copies the content to the stream. Otherwise an exception is raised.

procedure SaveToStream(aDest: TStream)

Parameters:

  • aDest: Stream

WriteAnsiString

Writes an ANSI string, preserving XML specific symbols.

procedure WriteAnsiString(const aValue: ROAnsiString)

Parameters:

  • aValue: an ANSI string

WriteEndElement

Writes the supplied value as last element and finishes the serialization.

procedure WriteEndElement

WriteNil

Writes a Nil value.

procedure WriteNil

WriteStartElement

Writes the supplied value as first element. If the serialization was already finished, an exception is raised.

procedure WriteStartElement(const aElementName: string)

Parameters:

  • aElementName: Element name

WriteString (UnicodeString)  overload

Writes the supplied wide-string value in UTF-8 encoding.

procedure WriteString(const aValue: UnicodeString)

Parameters:

  • aValue: the supplied wide-string value in UTF-8 encoding.

WriteString (WideString)  overload

Writes the supplied wide-string value in UTF-8 encoding.

procedure WriteString(const aValue: WideString)

Parameters:

  • aValue: the supplied wide-string value in UTF-8 encoding.

WriteUTF8String

Writes the supplied string value in UTF-8 encoding.

procedure WriteUTF8String(const aValue: ROUTF8String)

Parameters:

  • aValue: the supplied string value in UTF-8 encoding.