Hi everybody
here is a question
I have this class that a want to serialize :
Public Class BOO
<XmlAttributeAttribute()> Public THING As String
<XmlElementAttribute("param")> Public p() As param
End Class
it is (of course) working with this class :
Public Class PARAM
'I have not put the constructors...
<XmlAttributeAttribute()> Public name As String
<XmlAttributeAttribute()> Public X As String
End Class
You understand that I have a array of Param....
sometimes, in this array, some object PARAM does not have a value for the
attribute X
the serialisation looks like
<BOO THING ="hello girls" >
<param name="john" X="booboo" />
<param name="franck" />
<param name="bob" X="boo" />
</BOO>
here, Franck doesn't have a X value....
I simply want to do not have this line, and obtain :
<BOO THING ="hello girls" >
<param name="john" X="booboo" />
<param name="bob" X="boo" />
</BOO>
someone told me to use custom XmlAttributes ....(If X='' then dont write me)
I dont know how to do...
Is there another ways to do that?
Thanks for your help!
lobrys