[RESOLVED] dataset writexml question
hello,
I have a question about using writeXml. When I use this method, it writes to the specified xml file like this:
Code:
<safety>
<Incident>
<Name>Jason</Name>
<AGE>23</AGE>
</Incident>
<Incident>
<Name>Frank</Name>
<AGE>25</AGE>
</Incident>
</safety>
but, I would like to add these nodes to a parent node, ie:
Code:
<safety>
<SomeNode>
<Incident>
<Name>Jason</Name>
<AGE>23</AGE>
</Incident>
<Incident>
<Name>Frank</Name>
<AGE>25</AGE>
</Incident>
</someNode>
</safety>
I am creating the xml by first creating a dataset (connects to an SQL db and runs a query, filling the dataset) and using ds.WriteXML(myPath)
Any suggestions would be great. Thanks
jason
Re: dataset writexml question
You have full control over XML using the various XML classes. The problem would be that once you tinker with the XML, it is likely that you won't be getting your dataset back via ReadXML, because it will no longer be recognizeably a dataset. Is that an issue?
Re: dataset writexml question
yeah, it might be. after talking with co-workers, we decided it doesnt need to be in a parent node. thanks for the help, though