<Materials> <Material> <mtlCode>1</mtlCode> <mtlName>Activa</mtlName> </Material> <Material> <mtlCode>2</mtlCode> <mtlName>Ancor</mtlName> </Material> </Materials ----------------------------------------- doc.Load(xmlFilePath); XmlNodeList xmlnode = doc.SelectNodes"/Materials/Material[mtlCode=2]/mtlName"); string stringNode = xmlnode[0].Value; ------------------------------------------ But this code return null always. How can I get the value (ie. Ancor) as per mtlCode=2;
string stringNode = xmlnode[0].InnerText;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)