Creating event definitions from XML files
You can create an event definition that is based on the structure of an XML document. The generated event definition is based on the following:
All fields are treated as
string.
All prefixes are ignored, in other words, event definitions will be generated even if inner elements have different namespaces.
Namespace attributes (attributes having an
xmlns prefix) are ignored.
All inner event names are prepended with
Element_.
Generated event definitions will have an
xmlTextNode field if the XML element contains a text value and also contains an attribute.
To create an event definition from an XML file:
1. In the Project Explorer view, right-click the project’s eventdefinitions folder and select New > Event Definition from the pop-up menu. The New Event Definition dialog is displayed.
2. In the New Event Definition dialog, in the Generate Event Definition using field, select XML File and click Next. The Choose output location for Event Definition dialog is displayed.
3. In the Choose output location for Event Definition dialog, enter information in the following fields:
a. The Containing Folder field is the folder where the file will be saved; by default this is the currently selected folder of the current project, but you can select another folder or project using the Browse button.
b. In the File name field, specify the name of the new file. Specifying the .mon extension is optional as Software AG Designer will add the .mon file extension. Software AG Designer will not let you specify anything except .mon as a file extension.
c. The Package field is optional; information in this field is an EPL package name.
4. Click Next. This displays the Select XML File dialog.
5. In the Select XML File dialog, in the XML File field, specify the name of the XML file on which you want to base the event. You can use the Browse button to navigate to the desired file. The Down Arrow button switches the scope between Workplace and FileSystem.
6. In the Select XML File dialog, in the Event Name field, specify the name you want to assign to the root level event.
7. Click Finish.
An EPL file is created that defines the root level event along with associated nested events.