Hi lowell,
there is another way to acheive your goal, that involves also the "Reflection"... It has to be used with a strongly typed xml. It means that the xml must include the dataset structure. But it works fine and with nice performances.
At the top of the class you create you have to implement this:
Imports System.Reflection
Imports System.IO
First: you have to define and instanciate a new dataset
Dim oDS As New DataSet()
Second: use the IO.Stream to load the structure and the data of the xml file
Dim oStream As IO.Stream = [Assembly].GetExecutingAssembly.GetManifestResourceStream("< root Namespace>.Employees.xml")
The root namespace is a parameter of the project setted in the project property tab. In .NET 2003 go on the "Solution Explorer" right click the project name and choose "Properties".
green]Third: now use the XmlTextReader to read the stream
Dim oReader As New Xml.XmlTextReader(oStream)
Fourth: using the ReadXml od the dataset load the data and the structure into the dataset[/green]
oDS.ReadXml(oReader)
Once you have done theese few steps you could use a DataView to implement filtering on the data.
|