title: Using XPath in C#.NET
body: <p>I am planning to use XPath to query an XML file. Can you please point me to a link which states the advantages of using XPath? Will the use of XPath improve performance?</p>
  
  <p>I am using .NET Framework 2.0. At present I am iterating through the node.</p>
  
  <pre><code>XmlReaderSettings settings = new XmlReaderSettings();
  settings.IgnoreWhitespace = true;
  XmlReader reader = XmlReader.Create("mydata.xml", settings);
  XmlReader inner;
  while (reader.Read())
  {
  if (reader.Name == "xyz" &amp;&amp; reader.NodeType == XmlNodeType.Element)
  {
      inner = reader.ReadSubtree();
      inner.Skip();
      inner.Read();
      ......... //some changes to node
      inner.Close();
  }
  }
  reader.Close(); 
  </code></pre>