Ignoring Empty String while serialization

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

how can I ignore public empty string from being displayed in generated xml
the empty string displayed as
- <language>
<CharacterString />
</language>

i need if the string is empt to not be displayed
 
I believe if you set the string to Null it will not be serialized. So since
they are public and most likely properties, you could modify the set to
change empty string to null. Also, the node not being there would set the
string to null when desterilized.

--
Thanks
Wayne Sepega
Jacksonville, Fl


"When a man sits with a pretty girl for an hour, it seems like a minute. But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top