Hi Deenuji,
To find a keyword in the XML document (as it seems you requested in the title)
You can either use
XPath to search the XML or
Linq to XML.
An example article for using XPath
XPath reader-writer[
^]
The other option radically different in thinking is to search the raw text for the pattern,
that will best be accomplished using
RegularExpressions
See following example code:
public static void FindXMLs(FolderPath)
{
string [] files = Directory.GetFiles(FolderPath);
foreach(string fileName in fileEntries)
{
XDocument xdoc = XDocument.Load(fileName);
var element = xdoc.Elements("YourNode2Find_ComesHere").Single();
element.Value = "foo";
xdoc.Save(fileName);
}
}
Cheers,
Edo