The Sort property only applies if you look at the table through a
DataView (the DefaultView in this case). Since a DataView doesn't have
a WriteXml method, you'd have to hand craft the code to write the XML
out in specific order (perhaps by looping through the records as
sorted by DefaultView).
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Tue, 14 Dec 2004 11:19:04 -0800, "Ed Chiu"
<Ed****@discussions.microsoft.com> wrote:
Hi,
I am tring to use DataView Sort ability to sort an XML document, here are my
code snippet:
ds1.ReadXml("c:\temp\catalog1.xml")
ds1.Tables(0).DefaultView.Sort = "ProdName"
ds1.WriteXml("c:\temp\catalog2.xml")
Does not work at all, can someone help?
TIA