Join Query in XML
-
Hi All, In my web application I am using XML as a database. I am using XML schema for data definition. I am using dataset and dataview to retrive datafrom and XML file. I am doing like following. Dataset dstDemo = new Dataset(); dstDemo.ReadXMLSchema(MapPath("../Database/File.xsd")); dstDemo.ReadXML(MapPath("../Database/File.xml")); DataView dvCustomers = new DataView(dstDemo.Tables["Customers"]); DataView dvOrders = new DataView(dstDemo.Tables["Orders"]); Here Tables "Customers" and "Orders" are the two tables at the same level in xml file and both contain "CustomerID" column. This way I can fetch whole the table from DataSet to DataView and to select some rows from the dataview I am using RowFilter Property of dataview. dvCustomers.RowFilter = "CustomerCity = 'Bangalore'; dvOrders.RowFilter = "OrderDate = '03/02/2006'; But what if I want only few records from "Orders" Table depending upon "CusotmerIDs" got from the "Customers" table. I mean how can I use Queries like in SQL with XML files. Do any one have any idea. Any type of help will be appriciated. Thank u all in advance. Chetan Ranpariya.