.removing empty elements
-
Hi, I've written data from a dataset to xml with ds.WriteXml. The problem is that empty fields in a record are written as empty elements in the xml-file. Example The best option is to avoid these empty elements directly at the WriteXml-method of the dataset. The second option is to read the xml-file after construction, remove al the empty elements from it and save. After searching the web i couldn't find any suitable solution for this problem. Can someone help me? Note that the xml-file contains nested elements. Some of the nested elements can be empty also. thanks Ruud
-
Hi, I've written data from a dataset to xml with ds.WriteXml. The problem is that empty fields in a record are written as empty elements in the xml-file. Example The best option is to avoid these empty elements directly at the WriteXml-method of the dataset. The second option is to read the xml-file after construction, remove al the empty elements from it and save. After searching the web i couldn't find any suitable solution for this problem. Can someone help me? Note that the xml-file contains nested elements. Some of the nested elements can be empty also. thanks Ruud
-
Indeed, only the elements who have content need to be written from the dataset to xml. Otherwise, a solution who will remove all the empty elements from the output xml-file would be a good alternative. Every solution is right. Ruud