Converting business objects to XML documents

To convert a business object to an XML document, the XML data handler loops through the attributes in the business object definition in sequential order. It generates XML recursively based on the order in which attributes appear in the business object and its children.

The XML data handler processes business objects into an XML document as follows:

  1. The data handler creates a document to contain the XML data.
  2. The data handler examines the application-specific information in the top-level business object definition to determine if there are any child meta-objects (those whose names are listed in the cw_mo_label tag of the business-object-level application-specific information). The data handler does not include these attributes in the XML document.
  3. The data handler loops through the remaining attributes of the business object definition.

    The data handler generates XML for each attribute using the following rules:

    Note:
    If an attribute represents an XML element whose value contains single quotes, double quotes or the &, <, or > characters, then the attribute requires escape processing. An attribute is not escape-processed unless it contains the value escape=true in its application-specific information.This application-specific information must be placed at the end of any other text.
  4. When the data handler completes the conversion, it returns the XML document to the caller.
    Note:
    The verb information in a business object is lost in the conversion to an XML document. For information on preserving the verb, see Business object verbs.

Copyright IBM Corp. 1997, 2003