<Customer>
<Type H="General Information" ID="GeneralInfo">
<Row>
<C H="Customer Name">Mr. Robert</C>
<C H="Relation">S/O. John</C>
<C H="Date of Birth">01/01/1985</C>
</Row>
</Type>
<Type H = "Other Details" ID = "ShareDet">
<Row>
<C H = "Address 1">XYZ</C>
<C H = "Address 2">ABC</C>
</Row>
</Type>
</Customer>
I am trying to read "Mr. Robert" from above XML in C# but i could not. I tried below Code:
XmlDocument objXmlMain = new XmlDocument();
objXmlMain.LoadXml("Loading_Above_XMLSTRING");
string test = objXmlMain.SelectSingleNode("Customer/Type/Row/C/@H").Value;
I am getting result as "Customer Name" (That is attribute value). I want to read the Name by checking attribute value "Customer Name" and i should get result as "Mr. Robert"