XML Processing
Integration Utilities in DPL Studio can be used to format data in XML format, save the generated XML files to a specified folder location, and display the data in XML format.
You can also optionally apply an XSL Transformation to convert XML documents into:
a. Other XML documents
b. HTML documents
c. Plain text format
This example demonstrates how to retrieve query data using function parameters and process it as XML data.
In this example:
a. Parameters are retrieved from the Members section.
b. The corresponding properties are displayed in the Properties section of the Function Parameters dialog box.
c. The parameter name InTable is passed to the GetQuery() function.
d. The parameter InTable contains: ParamType: Query, ParamValue: Customers
Sample Code
using Data Process Logic.DataEngine;
using Data Process Logic.Connectors.ConnectorInterfaces;
using Data Process Logic.IntegrationUtils;
public class XmlProcessing : IIntegrationFunction {
public void Execute(DataEngine theEngine) {
IntegrationUtils.Initialize(theEngine);
IDataCachedTable tbl = theEngine.GetQuery("InTable");
XmlTable xt = new XmlTable(tbl);
// The element name represents each first-level XML element.
// If not specified, the name is automatically obtained from the input table.
xt.ElementName = "Customer";
// Optionally specify an XSL transformation file.
xt.TransformFile = @"%FPDIR%\CustList.xslt";
// Various output options
xt.Display();
xt.Save(@"%FPDIR%\Final.xml");
System.Console.WriteLine("Done");
}
}
Features Demonstrated
This example shows how to:
a. Retrieve query data using Integration Functions
b. Convert query data into XML format
c. Define custom XML element names
d. Apply XSL transformations
e. Display XML output
f. Save XML files to the Fusion Pack directory