The XML Format plug-in allows you to extract data from XML files, or to generate XML data from the BP Server dataslots.
You can use the XML plugin for File Managed Adapters and Email Managed Adapters.
To configure XML format plug-in:
1. For a File Managed Adapter, open the File Adapter Configurator dialog box, select the Mode as Read or Write and enter the file name. Select the XML option for the Data Format. After you have selected XML, the generic File Format tab is enabled and renamed to a format-specific XML tab.
For an Email Managed Adapter, open the Email Adapter Configurator dialog box (refer to Configuringthe Email Adapter). Click Add to add a new part to the message. Select XML from the options in the enabled cell in the Format Plugin column.
2. Open the XML tab.
In this tab you can enter the Name, XPath, and Type for each field in your record. Each of the parameters defined here corresponds to a node in the XML file. The location of each node in the XML tree is specified by an XPath expression.
At this step, you need to define a template XML as explained in the section Defining the template XML in Progress OpenEdge Business Process Modeler: User's Guide.
3. Click Template to open the Select XML Template dialog box.
a. Select the template file. If you do not want to use the pre-configured template, or if your XML template comes from a dataslot, click Clear to clear the file name.
b. Click OK to return to the File Adapter Configurator.
4. Click Add to define a new record. The Parameter Editor dialog box appears.
a. Define a Name for the field.
b. Define the Type of the value it will contain.
c. Enter the XPath expression identifying the node directly, or click in the XPath field to open the XPath Browser dialog box.
d. Select the node. The XPath expression is displayed in the text field at the bottom. If required, you can manually edit this expression. For example, if you are looking for a particular record, one of a sequence of records, in a XML file - in this case you may specify the record number or search condition. For more information, refer to the Using variables and conditions in XPath topic in Progress OpenEdge Business Process Modeler: User's Guide.
e. Click OK to return to the Parameter Editor dialog box.
f. Click OK to return to the File Adapter Configurator.
5. Click Modify to modify the field definition.
Click Remove to delete a field.
Click Up or Down to move the field to match the desired record structure.
6. Click OK to open the Dataslot Mapping dialog box.
Alternatively, you can open the Dataslot Mapping dialog box by clicking Change mapping in the Properties view.
7. Under Source, select a dataslot where the fields in your record should come from. The value of this dataslot will be stored in your output file. Note that depending on the File Adapter configuration, the mapper window may look different or may contain additional fields.
For more complex mapping of XML files, refer to the section Using variables and conditions in XPath in the Progress OpenEdge Business Process Modeler: User's Guide.
8. Click OK. The File Adapter is now fully configured for XML files.