RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXMLTransformClient.GetDataAsXml Method

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

Pascal
function GetDataAsXml(const PublishTransformFile: string): string; virtual;
C++
virtual __fastcall AnsiString GetDataAsXml(const AnsiString PublishTransformFile);

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.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!