serializing empty xml element

pelican

Member
Joined
Feb 22, 2005
Messages
7
Hi,

i am using System.Xml.Serialization;

how can i serialize an empty element output <something /> ?

currently, after serialize an empty element, it wont show, only not null element wil be output.

Please advise.
 
Try putting the following attribute before the variable / property in question
Code:
<System.Xml.Serialization.XmlElement(IsNullable:=False)>
 
Back
Top