You need to understand DataSets better, and the difference between a
serialized class and the class itself. The XML file you're talking about is
an XML document. When you create a DataSet and read from the file to
populate it, you are no longer dealing with XML; you're dealing with a
DataSet. An XML document doesn't have columns and rows; it has nodes. A
DataSet doesn't have columns and rows either; it has Tables (DataTables) and
schema information about the data and the tables. A DataTable can not be
filtered. But when you use a DataTable, you generally work with a DataView
rather then the table itself. Now, a DataView can be filtered, sorted, and
manipulated in a variety of ways. For more information, see:
http://msdn.microsoft.com/library/de...xmldataset.asp http://msdn.microsoft.com/library/de...ngdatasets.asp http://msdn.microsoft.com/library/en...asp?frame=true http://msdn.microsoft.com/library/en...asp?frame=true
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Show me your certification without works,
and I'll show my certification
*by* my works.
"Jason Huang" <Ja************@hotmail.com> wrote in message
news:u9**************@TK2MSFTNGP14.phx.gbl...
Hi,
I use the ReadXML method in my C# Windows Form project.
Here is some of my C# code:
xmlDS.ReadXml(curDir + "\\Dept.xml") ;
There're 20 rows and 5 columns in the Dept.xml.
But now I just want some of the data in the Dept.xml, e.g., DeptLevel >1
AND Status=0.
How do I filter the XML or xmlDS so that the output is what I need?
Thanks for help.
Jason