![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
If the map already exists, click the icon beside the map in the Tables tab for the XML document name and choose Open from the menu. Otherwise, create a new XML Field Map in the XML Field Map wizard, as follows:
1. In the open XML Field Map editor, type the identification information on the Properties tab, if desired, and click the Field Map tab.Note: To associate the XML field map name with a table, specify that name in the XML document’s Tables tab.
3. Select the fields you would like to include in your field map. For this tutorial, select all the fields up to and including HIREDATE except MGR#.You must exclude MGR# because it contains #, a special XML control character, which, if it is part of a field name, cannot be correctly handled by Object Service Broker. If your tables contain field names with the # character, rename those fields for the XML document in the Root Name column.Next, assign an XML type to each field. After you’ve added the fields, each of them in the Field Map is, by default, assigned an XML type of Element. Your type choices are Attribute, Empty Element, and Element. What’s their difference? The following figure shows the XML code generated for one occurrence from the table ECTS_EMPLOYEES with annotations to show how the three attribute types affect the generated XML.
The field names that appear in the XML document are the actual table field names. You can rename any of them by specifying a new, case-sensitive name in the Field Map’s “Root name” column. The name must not contain the # character or any spaces.To execute an XML document, select the document and choose Run As from the short-cut menu in the XML Documents or OSB Projects view. The following figure shows the Run XML Document dialog box.
When an XML document is produced, the order of the elements changes if you add a group to the field map associated with the document. This is the intended behavior. The XML standard states that elements are not positional within a document. The receiving application must be able to determine how to handle each element according to the element name.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |