RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXMLTransform.TransformXML Method

Converts an XML document using the specifications in a transformation file.

Pascal
function TransformXML(const SourceXml: string; const ATransformationFile: string = ''): string;
C++
__fastcall AnsiString TransformXML(const AnsiString SourceXml, const AnsiString ATransformationFile = '');

Call TransformXML to convert an XML document when the source XML is an in-memory string. 

SourceXml is a string of XML to be transformed. It can be any type of XML document, including an XML data packet. It must, however, conform to the schema expected by the transformation document used to perform the transformation. If the transformation converts a specific type of XML document into a data packet, SourceXml must conform to the expected schema. If the transformation converts a data packet into an XML document, SourceXml must be an XML data packet with the expected metadata. 

ATransformationFile is the transformation file to use when performing the translation. A transformation file is a special type of XML file with the .xtr extension. Each transformation file is specific to a particular XML schema and data packet format and represents a one-way transformation. Use the xmlmapper utility to create transformation files. 

If the ATransformationFile parameter is omitted, TransformXML uses the file specified by the TransformationFile property, or the document specified by the TransformationDocument property. 

TransformXML returns the results of the conversion as a string of XML. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!