470,848 Members | 1,751 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,848 developers. It's quick & easy.

Can you do this?



I have a dataset that I want to write to XML

The dataset has two data tables with a parent child relationship 1:1

What I want to do is when I use myDataset.WriteXML(somefile);

Create a document that places the child within the parent node for example

<TestedBatch>
<BatchNumber 1234 />
<TestDate 1/1/2006 />
<TestDetails> <--- this is the child table
<test1 "5.0">
<test2 "3.3">
</TestDetails>
</TestedBatch>

I'm not getting this when I write to XML, I get all of the parent table
entries, and then all of the child table entries.

Any thoughts?

Thanks,
Jusitn
Jun 21 '06 #1
1 913
RJ
XSLT may be the "standard" technique for transforming the format of an XML
document into some other format. This would be a little different concept,
where you take the output of the DS.WriteXML and apply or transform it into
a second output as specified by another XSL document. Google on ".net xsl
transform" and you should get plenty of examples.

"Justin Lazanowski" <ju****@nospam.southeastmilk.org> wrote in message
news:OV**************@TK2MSFTNGP04.phx.gbl...


I have a dataset that I want to write to XML

The dataset has two data tables with a parent child relationship 1:1

What I want to do is when I use myDataset.WriteXML(somefile);

Create a document that places the child within the parent node for example

<TestedBatch>
<BatchNumber 1234 />
<TestDate 1/1/2006 />
<TestDetails> <--- this is the child table
<test1 "5.0">
<test2 "3.3">
</TestDetails>
</TestedBatch>

I'm not getting this when I write to XML, I get all of the parent table
entries, and then all of the child table entries.

Any thoughts?

Thanks,
Jusitn

Jun 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by James | last post: by
5 posts views Thread by Scott D | last post: by
2 posts views Thread by Nick | last post: by
2 posts views Thread by Alexander Ross | last post: by
reply views Thread by Dan Foley | last post: by
5 posts views Thread by Lee Redeem | last post: by
5 posts views Thread by christopher vogt | last post: by
6 posts views Thread by Phil Powell | last post: by
1 post views Thread by Michel | last post: by
11 posts views Thread by Maciej Nadolski | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.