Hi,
In need to create an XML , the thing is if the value is not present for some tag i should not pass that tag.
Example:
At present the output is:
<Main>
<Customer>
<Name>ABC</Name>
<SurName></SurName>
<Age>23</Age>
</Customer>
</Main>
But i need output in this manner:
<Main>
<Customer>
<Name>ABC</Name>
<Age>23</Age>
</Customer>
</Main>
That means there is not "SurName" so i need to remove that..
Can anyone suggets how to do this.
Thanks,
Thripura
Regarding XML Output
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 258
- Joined: Tue Jul 04, 2006 10:35 pm
- Location: Toronto
Re: Regarding XML Output
Try to build teh xml using a Transformer stage with if else conditions.