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

TXMLObjectWriter.GetPropertyElement

Gets a TDOMElement used to serialize a property using the specified type name.

Declaration

Source position: laz_xmlstreaming.pas line 58

protected function TXMLObjectWriter.GetPropertyElement(

  const TypeName: string

):TDOMElement;

Arguments

TypeName

  

Name for the type represented in the property element.

Function result

TDOMElement used to represent the type and property name.

Description

GetPropertyElement returns a TDOMElement configured to represent a property using the specified type.

The TagName in the element is set to the specified TypeName argument. The property name is retrieved from the internal element stack in the class instance and stored as the 'name' attribute in the element. If the property name has not been assigned (''), the name attribute is omitted from the element.

The TDomElement in the return value is appended as a child node to the element stack.

GetPropertyElement is used in the implementation of write methods in the object instance. Such as:

These calling routines set the 'value' attribute for the element returned from the method. Tehety may set set additional attribute values, like 'class', as needed for a component or type.

Errors

Raises an Exception if the DOM elment already exists, and has therefore already been saved.


Version 4.0 Generated 2025-05-03 Home