DataSet.GetXml not returning null results
Posted
by pistacchio
on Stack Overflow
See other posts from Stack Overflow
or by pistacchio
Published on 2009-06-08T07:19:46Z
Indexed on
2010/04/07
3:03 UTC
Read the original article
Hit count: 509
Hi, whenever I convert a DatSet into an XML with DataSet.GetXml, any null value is ignored, so, where i expect this:
<value1>a</value1>
<value2></value2>
<value3>c</value3>
I get this instead:
<value1>a</value1>
<value3>c</value3>
Any quick and dirty way to handle this? Thanks
EDIT: I think a solution would be using WriteXml. Could anyone provide me with a sample of using it WITHOUT writing to a file but getting a string just like GetXml does? Thanks
© Stack Overflow or respective owner