Regarding XML Output
Posted: Fri Dec 17, 2010 1:33 am
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
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