title: Easy way of Multiple XML file search
body: <p>I want to search for an element value in all the XML files(assume 200+) in a folder using C#.</p>
  
  <p>My scenario is each file will contain multiple item tags.So i have to check all  item tags for User Selected SearchValue. Eg: ABC123</p>
  
  <p>Currently i am using foreach loop and it's taking longtime.</p>
  
  <p>Could you please suggest me a better option to get result much faster</p>
  
  <p>Following is my current code implementation.</p>
  
  <pre><code>string[] arrFiles = Directory.GetFiles(temFolder, "*.xml");
              foreach (string file in arrFiles)
              {
                  XmlDocument doc = new XmlDocument();
                  doc.Load(file);
                  XmlNodeList lstEquip = doc.SelectNodes("scene/PackedUnit/Items/ItemCode");
                  foreach (XmlNode xnEquip in lstEquip)
                  {
                      if (xnEquip.InnerText.ToUpper() == equipCode.ToUpper())
                      {
                          String[] strings = file.Split('\\');
                          string fileName = strings[strings.Count() - 1];
                          fileName = fileName.Replace(".xml", "");
                          lstSubContainers.Add(fileName);
                          break;
                      }
                  }
              }
  </code></pre>