Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

How to get attribute value based on input attribute value. Please help its very urgent. thanks in advance

$
0
0

i have one xml file which have below data, i need to give Name attribute and need to get Heirarchy attribute value.

please give me c# code for this(linq to xml  or other approach)

for example:

input: LoginUserName

output: LogInWindow,textBox_UserName

input: PatientCreateName

output: PatienceLogInWindow,textBox_UserName


<UIW>
 
  <Login  Name="LogInWindow" Heirarchy="Login">
    <UserName  Name="LoginUserName" Heirarchy="LogInWindow,textBox_UserName" Type="Edit"/>
    <Password  Name="LoginPassword" Heirarchy="LogInWindow,textBox_Password" Type="Edit"/>
    <Button  Name="LoginButton" Heirarchy="LogInWindow,OKButton" Type="Edit"/>
  </Login>
 
  <PatientCreate  Name="Sample1" Heirarchy="LogInWindow">
    <UserName  Name="PatientCreateName" Heirarchy="PatienceLogInWindow,textBox_UserName" Type="Edit"/>
    <Password  Name="PatientLoginUserName" Heirarchy="LogInWindow,textBox_UserName" Type="Edit"/>
    <Button  Name="PatientLoginUserButton" Heirarchy="LogInWindow,textBox_UserName" Type="Edit"/>
  </PatientCreate>
 
</UIW>


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>