Xml.XmlTransform.TTranslateEvent

From RAD Studio API Documentation
Jump to: navigation, search

C++

typedef void __fastcall (__closure *TTranslateEvent)(System::TObject* Sender, System::UnicodeString Id, Xml::Xmldom::_di_IDOMNode SrcNode, System::UnicodeString &Value, Xml::Xmldom::_di_IDOMNode DestNode);

Properties

Type Visibility Source Unit Parent
typedef public Xml.XmlTransform.hpp Xml.XmlTransform Xml.XmlTransform

Description

TTranslateEvent is the type for the OnTranslate event handler.

TTranslateEvent is the type of the OnTranslate event handler. OnTranslate occurs when an XML transform component needs to translate user-defined nodes. This event can occur when translating XML documents into data packets or when translating data packets into XML documents.

Sender is the XML transform component that generates the event.

Id is a string that identifies the node in the XML document. This identifier is assigned using the Node Repository page of Xmlmapper.exe when the transformation file is generated.

SrcNode is the DOM interface for the node being translated. If the current translation is from XML document to data packet, this is the node with the Id specified by Id. If the current translation is from a data packet to an XML document, this is a node in the XML form of the data packet.

Value returns the translation of SrcNode. If the current translation is from XML document to data packet, on entry to the event handler this is the value of SrcNode, if available. On exit, this is a string representation of the value to be assigned to the corresponding field in the data packet. If the current translation is from data packet to XML document, on entry to the event handler this is a string representation of the field (or parameter) value. On exit, it should be the value of the XML node that has the identifier Id (including any subnodes, if appropriate).

DestNode is the DOM interface for the translated node. If the current translation is from XML document to data packet, this is the node for the field in the XML data packet. If the current translation is from data packet to XML document, this is the XML node that has the identifier ID.

See Also