XML, im feeling a bit losthttp://forums.asp.net/t/298099.aspx/1?XML+im+feeling+a+bit+lostSat, 02 Aug 2003 13:31:13 -0400298099298099http://forums.asp.net/p/298099/298099.aspx/1?XML+im+feeling+a+bit+lostXML, im feeling a bit lost Hi I am feeling a bit lost and confused with XML. I am trying to build a very simple web app that will get its data from an XML file which has been created from a SQL server. The application allows the user to hold a contact details on there laptops in a disconnected environment. They only need to be able to read the data and no editing or inputting is required. So I build an XML file using ado.net, I would like the user to be able to query the xml file via a textbox. So if the user types in 'Sam' it will go away and pull out all Contacts with the first name Sam and fill a datagrid with teh results. However I am a bit confused on how I query a XML file also do I have to put it in a dataset before I can fill a datagrid? I briefly heard that I should be using XPath, XQuery or something like XSL. I have never really used XML, all I want to do is pass it one parameter. My code looks like teh below: Dim dsWards As New DataSet() dsWards.ReadXml(Server.MapPath("Contacts.xml")) DataGrid1.DataSource = dsWards DataGrid1.DataBind() I would be grateful for some simle examples that I could have a look at in VB.Net. Also I am using Visual Studio .Net 2003, does this come with any tools that will help me query an XML file? I just feel a bit lost and cant find any good examples PS All the users will have IIS running on their machines 2003-08-02T09:29:10-04:00298153http://forums.asp.net/p/298099/298153.aspx/1?Re+XML+im+feeling+a+bit+lostRe: XML, im feeling a bit lost One key ideas in loading XML file to dataset is that you can then access the data in relational ways. Without seeing your XML it is hard to say what kind of structure it has done in the DataSet whebn XML is loaded, but you generally could filter the DataSet without using XSLT and Xpath. Especially if you want to bind the results. You could do so as you do with normal DataSet & DataTable and DataView that get from DataTable's (the one that represents Contacts table in your DataSet) DefaultView that return the DataView and specify filetering expression for it's RowFilter property (the filter expressions is like WHERE condition in SQL ie. FirstName LIKE '%Sam%'. If you want more exact answer, please provide some more details. 2003-08-02T13:31:13-04:00