|
-
Apr 16th, 2012, 07:12 AM
#1
Thread Starter
Hyperactive Member
[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
if i was able to help, rate my post!
-
Apr 16th, 2012, 11:07 AM
#2
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?
My usual boring signature: Nothing
 
-
Apr 16th, 2012, 02:26 PM
#3
Thread Starter
Hyperactive Member
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
if i was able to help, rate my post!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|