Assuming you are attempting to retrieve a set of matching nodes _after_ you have an XML document (versus filtering out the non-matching nodes _before_ translating into XML), why not use an XPath query? In particular, see the System.Xml.XPath namespace and the System.Xml.XPath.XPathNavigator class.
-----Original Message----- From: Woodard, John [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2003 2:21 PM To: [EMAIL PROTECTED] I am looking for a way to do an advanced query quickly and efficiently. Given the following XML structure read into a DataSet of people and the colors they are wearing: <Person> <Name>One</Name> <Color>Red</Color> <Color>Green</Color> <Color>Blue</Color> </Person> <Person> <Name>Two</Name> <Color>Red</Color> <Color>Green</Color> <Color>Orange</Color> </Person> <Person> <Name>Three</Name> <Color>Blue</Color> <Color>Green</Color> <Color>Orange</Color> </Person> Which would give me two related tables in my DataSet, Person and Color, and assume that there are tens of thousands of people in the table. How do I query for all people wearing red? It seems as if this should be possible, even simple, but I can't find a way to do it. Doing it row by row by using CreateChildView would take forever even on a screaming system. Querying the color table and then building a big honking query from the Person_id column (that ADO.NET puts in place to relate things in this circumstance) seems like it would be slow as well. How long would it take ADO to parse a search statement with 10,000 ORs? Ugh.
