<?xml version="1.0" encoding="utf-8" ?>
<Response success="true">
<data>
<class name="getId" classValue=" this is a class value"></class>
</data>
</Response>
string strPath = @"C:\Users\Fale\Documents\practice\xpathNavigator\xpathNavigator\1.xml";
XDocument Xdco = XDocument.Load(strPath);
var list = from i in Xdco.Root.Descendants("Response")
where i.Attribute("success").Value == "true"
select i.Element("data").Element("class").Attribute("classValue").Value;
How to check response is true and then to get attribute value using linq c#?