Showing posts with label XMLSendChildFirst. Show all posts
Showing posts with label XMLSendChildFirst. Show all posts

Monday 19 November 2012

XML Optimization through custom Properties


1. Problem Statement:
I am creating a XML file as an output . If my source is empty, is there a way to  avoid the creation of an empty XML file?
Sample output Data with source data :

Case 1 : Empty Source – Creation of Minimal XML file
We have to set the following properties of an XML Target at session level under the Mapping tab.
Null Content Representation – “No Tag”
Empty String Content Representation – “No Tag”
Null Attribute Representation – “No Attribute”
Empty String Attribute Representation – “No attribute”
The Output file is as follows
Note: It generates the minimal XML and parent tag. The parent tags are shown as Unary Tag in the browser.