Microsoft is developing a programming system that makes it easier to manipulate trees. Let's learn from this for the requirements of our project. XLinq .NET Language Integrated Query for XML Data September 2005 3.1.2 XML Query Extensions XML-specific query extensions provide you with the query operations you would expect when working in an XML tree data structure. These XML-specific query extensions are analogous to the XPath axes. For example, the Elements method is equivalent to the XPath * (star) operator. The following sections describe each of the XML-specific query extensions in turn. 3.1.2.2 Descendants and Ancestors The Descendants and Ancestors query operators let you query down and up the XML tree, respectively. Descendants with no parameters gives you all the child content of an XElement and, in turn, each child's content down to the leaf nodes (the XML subtree). Optionally, you can specify an XName (Descendants(XName)) and retrieve all of the descendants with a specific name, or specify a type (Descendants) and retrieve all of the descendants of a specified XLinq type (for example, XComment). For example, to get all of the phone numbers in our contact list, you could do the following: contacts.Descendants("phone"); Descendants and Ancestors do not include the current node. If you use Descendants() on the root element, you will get the entire XML tree except the root element. If you want to include the current node, use SelfAndDescendants, which lets you specify an XName or type. Ancestors and SelfAndAncestors work similarly to Descendants and SelfAndDescendants; they just go up the XML tree instead of down. The Descendants and Ancestors XML query extensions can greatly reduce the code needed to traverse an XML tree. You will find that you use them often for quick navigation in an XML tree. Implications for project requirement: A // * : entire object, including root (SelfAndDescendants) A // B : all B descendants (SelfAndDescendants) A // -> *,phone,* : all descendants having a phone field, including the target of the phone field (SelfAndDescendants)