A
Atul Agarwal
If I use the following code
DataSet ds = new DataSet();
ds.ReadXml("input.xml", XmlReadMode.InferSchema);
ds.WriteXml("output.xml");
and provide the following Input.xml
<A>
<C> c1 </C>
<C> c2 </C>
<D> d1 </D>
<E> e1 </E>
<E> e2 </E>
<F> f1 </F>
</A>
the Output.xml contains the following XML in which the elements are
not in the same sequence as in the input XML.
<A>
<D> d1 </D>
<F> f1 </F>
<C> c1 </C>
<C> c2 </C>
<E> e1 </E>
<E> e2 </E>
</A>
I guess this happens because all the columns of a Parent Table are
serialized before the columns of a Child table. Is there any way I can
make the DataSet maintain the input element sequence during
serialization, ie, Children are serialized at their proper "position"
within their Parent ?
Thanks
Atul Agarwal
DataSet ds = new DataSet();
ds.ReadXml("input.xml", XmlReadMode.InferSchema);
ds.WriteXml("output.xml");
and provide the following Input.xml
<A>
<C> c1 </C>
<C> c2 </C>
<D> d1 </D>
<E> e1 </E>
<E> e2 </E>
<F> f1 </F>
</A>
the Output.xml contains the following XML in which the elements are
not in the same sequence as in the input XML.
<A>
<D> d1 </D>
<F> f1 </F>
<C> c1 </C>
<C> c2 </C>
<E> e1 </E>
<E> e2 </E>
</A>
I guess this happens because all the columns of a Parent Table are
serialized before the columns of a Child table. Is there any way I can
make the DataSet maintain the input element sequence during
serialization, ie, Children are serialized at their proper "position"
within their Parent ?
Thanks
Atul Agarwal