Xml.XmlTransform.TXMLTransform.TransformXML

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function TransformXML(const SourceXml: string;  const ATransformationFile: string = ''): string;

C++

System::UnicodeString __fastcall TransformXML(const System::UnicodeString SourceXml, const System::UnicodeString ATransformationFile = System::UnicodeString());

Properties

Type Visibility Source Unit Parent
function public
Xml.XmlTransform.pas
Xml.XmlTransform.hpp
Xml.XmlTransform TXMLTransform

Description

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

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.

See Also