How to render empty byte array element as xml tag in c#?
-
Hi, I'm using a property as byte array in a model. Now while serializing this model into xml, if this property is null, then it's not rendering as tag. I'm using [XmlElement(IsNullable=true)] attribute on that property.If i do this, in this case it's creating tag with attribute something like xi:nil=true. I don't want this. If that property is null, then make it as empty element else assign value. Please give me solution.
-
Hi, I'm using a property as byte array in a model. Now while serializing this model into xml, if this property is null, then it's not rendering as tag. I'm using [XmlElement(IsNullable=true)] attribute on that property.If i do this, in this case it's creating tag with attribute something like xi:nil=true. I don't want this. If that property is null, then make it as empty element else assign value. Please give me solution.
-
Why do you care what the XML looks like? Supply a default constructor for the class in question with an initializer for the byte array to resolve any nulls when de-serializing.
The other party app receiving XML without any attributes. If any attributes are there that throwing exception
-
The other party app receiving XML without any attributes. If any attributes are there that throwing exception