Remove DataSet from XML output

bzagars

New member
Joined
Jun 17, 2005
Messages
3
Programming Experience
10+
I have a dataset that was designed around a schema which to populate I added a top level dataset which it defaulted to NewDataSet. When I write the XML file I now get that level in my XML file. Anyone know how I can remove that level?

Bob
 
Last edited:
I think you'll find that it is of type NewDataSet and that that node is required to specifiy that fact. You can change the name to something more descriptive, but an XML file that represents an object will always have a node to tell you want type of object it is.
 
The NewDataSet or if I change the DataSetName (or something close to this) it still does not remove my problem. I want to remove the root table/tree/tag. The specs of the system I am developing requires me to start with GDP_BOL_GB with attributes. I have not found a way of adding attributes to the root of a DataSet. The only way I got the conversion to work was to add the NewDataSet level first and I could programmically add the rest of the specs for data layout.

Bob
 
If you have specifications on the XML schema then I'd say that you're going to have to build the XML file yourself, using XmlDocument and the like. The manner in which WriteXml structures its output is predefined, I'd say.
 

Latest posts

Back
Top