I've created an asp.net web service for a client of ours which returns multiple List
objects containing complex types. The client has been receiving data just fine.
He has noticed though that not all the tags are there all the time. If, for example, I return 3 objects in my list, objects A B and C. and C is null when I return it. It will show:
<A>data</A>
<B>data</B>
When I would like it to show the following:
<A>data</A>
<B>data</B>
<C/>
Or at least:
<A>data</A>
<B>data</B>
<C></C>
Basically, I want the structure of the XML to remain the same regardless of what data is available and what data is null.
Any suggestions?
Thanks a lot!!