I have my xml . it has nested elements in it. i just want to select that element by name without providing the parent tag name.
<?xml version="1.0" encoding="UTF-8"?>
<Names>
<Name>
<test>
<MiddleName>HelloMotto</MiddleName>
</test>
<FirstName>John</FirstName>
<LastName>Smith</LastName>
</Name>
</Names>
when we query
XmlNode idNode = root.GetElementsByTagName(textboxValue)[0];
We get the Node and its inner text.
But for Middle Name part its failing.
I dont want to give any XPath.
I just want to give the node name and retrieve its value.