you need to use here is theXLINQ. After adding the reference to System.Xml.Linq
in your program do write the below code.
XElement companyInfo = XElement.Parse(
@"<COMPANYINFO>
<CORPORATE ID=""C45RT4C"" NAME=""NEW COMPANY LTD."">
<LOCATION ID=""P88972FC"" NAME=""EASIER"">
<SUBLOCATION ID=""S89872FE"" NAME=""400462""/>
</LOCATION>
<LOCATION ID=""PDRD2905"" NAME=""XT-454560-5"">
<SUBLOCATION ID=""SFDF22D7"" NAME=""202743""/>
<SUBLOCATION ID=""S106B993E"" NAME=""401048""/>
<SUBLOCATION ID=""SDEA2907"" NAME=""507152""/>
<SUBLOCATION ID=""123C699"" NAME=""507180""/>
<SUBLOCATION ID=""HTY4C896"" NAME=""507205""/>
<SUBLOCATION ID=""SFD580DD"" NAME=""600281""/>
</LOCATION>
<LOCATION ID=""PD1104ED"" NAME=""TD-454560-4"">
<SUBLOCATION ID=""211704EF"" NAME=""202724""/>
<SUBLOCATION ID=""SFD37943"" NAME=""401056""/>
<SUBLOCATION ID=""XDEA2A2D"" NAME=""507169""/>
</LOCATION>
</CORPORATE>
</COMPANYINFO>");
foreach (XElement subLocation in companyInfo.Elements("CORPORATE").Elements("LOCATION").Elements("SUBLOCATION"))
{
Console.WriteLine(subLocation.Attribute("NAME").Value);
}