I have the following XML file. I want to get Max(\"NR\") using LINQ. Could anyone help me to do this? I know how to do this for nodes,
XML
Max(\"NR\")
LINQ
XDocument xDoc = XDocument.Load(@" your XML file path "); int maxNr = xDoc.Root.Elements().Max(x => (int)x.Element("NR"));
After you specify the file path, you can get "NR" using the Element.