Datasnap.Xmlxform.TXMLTransformClient.GetDataAsXml

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function  GetDataAsXml(const PublishTransformFile: string): string; virtual;

C++

virtual System::UnicodeString __fastcall GetDataAsXml(const System::UnicodeString PublishTransformFile);

Properties

Type Visibility Source Unit Parent
function public
Datasnap.Xmlxform.pas
Datasnap.Xmlxform.hpp
Datasnap.Xmlxform TXMLTransformClient

Description

Fetches a data packet from the provider and converts it to an XML document.

Call GetDataAsXml to obtain an XML document that is the translation of a data packet from the associated provider. GetDataAsXml

1. Passes any parameters supplied to the SetParams method to the provider specified by ProviderName.

2. Obtains a data packet that the provider returns.

3. Uses the transform component specified by TransformGetData to convert the data packet to an XML document. If the PublishTransformFile parameter is not an empty string, GetDataAsXml uses the file specified by this parameter as the transformation file. Otherwise, it uses the transformation file specified on the TransformGetData property.

4. Generates an OnTranslate event for every user-defined conversion in its transformation. The application can use this event to perform the user-defined conversion that converts field values into XML nodes.

5. Returns the resulting XML document as a string.

Once you have obtained the resulting, translated XML document, you can assign it to a TXMLDocument component or save it to a file.

Note: Before you can call GetDataAsXml, you must supply any input parameters using the SetParams method and set properties on TransformGetData to indicate what transformation to perform.

See Also