WebSphere Message Brokers
File: ad06710_
Writer: Terry Cowling

Reference topic

This build: July 31, 2007 21:22:48

XML rendering options

There are four properties on the XML layer that you can use to affect how the XML messages are rendered. The table below shows examples of the values that you can set for the Member Render property. In this table, the member element is referred to as A, and has the value value of element. The parent is referred to as X.

The effect of rendering options on XML output

To get XML rendered like this: Set this Member Render property value: Set these other property values:
<X>
<A>value of element</A>
</X>
XMLElement (the default)

Member XML Name = A

<X A='value of element'/> 
XMLAttribute

Member XML Name = A

<X>
<Field id='A'>value of element</Field>
</X>
XMLElementAttrID

Member XML Name = Field
Member ID Attribute Name = id
Member ID Attribute Value = A

<X>
<A val=value of element/>
</X>
XMLElementAttrVal

Member XML Name = A
Member Value Attribute Name = val

<X>
<Field id='A' val='value of element'/>
</X>
XMLElementAttrIDVal

Member XML Name = Field
Member ID Attribute Name = id
Member ID Attribute Value = A
Member Value Attribute Name = val

You should not have an element in the model that is rendered as an XML attribute. This can result in incorrect validation of XML documents. Instead the element should be redefined as an attribute in the model.

You should not have an attribute in the model that is rendered as an XML element. This can result in incorrect validation of XML documents. Instead the attribute should be defined as an element in the model.

There is one scenario where this technique is appropriate. When you have created a message model by importing a C header file or a COBOL copybook, it will consist entirely of elements. An XML form of this model can be created by simply adding an XML physical format to the message set. If you are looking for certain elements to appear as XML attributes in the XML form, then you can use the Render property to achieve this.

Related concepts
Physical formats in the MRM domain
MRM XML physical format
MRM XML physical format: relationship to the logical model
Related tasks
Working with physical properties
Configuring physical properties
Related reference
Message model object properties
Physical properties for message model objects
Custom Wire Format physical properties for message model objects
TDS format physical properties for message model objects
Documentation properties for all message set objects
Message model object properties by object
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:22:48

ad06710_ This topic's URL is: