Try OpenEdge Now
skip to main content
Managed Adapters Guide
File Managed Adapter : Working with the File Adapter : Configuring the File Adapter : Defining the template XML
 
Defining the template XML
Consider that you need to generate an XML file using values from dataslots in your process and the XML needs to be generated in the following format:
<library>
    <book id="187510">
        <author>Johnny Appleseed</author>
        <title>Pocket Guide to Apple Trees</title>
    </book>
</library>
You need to first create a template XML. Using a text editor, create the library.xml template, with the following content:
<library>
    <book id="0">
        <author></author>
        <title></title>
    </book>
</library>
Note that the author’s name and the book title are removed from the example. While not strictly necessary, this will ensure that if these fields are not mapped to any dataslots, they will be empty and not contain any incorrect data. You can also enter default strings here such as "unknown".
Once you save the template file, you can return to the Process Designer.
Note: If your XML template refers to a DTD file, make sure that the DTD is specified in such a way that it is available for the XML parser when the adapter is invoked by the application server. For the DTD file name, either use global URL, or at least fully qualified file name that will be available to the Business Process Server.