I have a XML file
<resources>
<string name="aaa">Hotel</string>
<string name="bbb">Home</string>
<string name="ccc">Castle</string>
...
<resourses>
I tried got content string (Hotel or Home ...) in using special name of this (aaa, bbb ..).
var xml = XDocument.Parse(yourxmlstring, LoadOptions.None);
var resources= xml.Descendants("resources");
foreach (var resourceElement in resources.Descendants("Hotel"))
{
MessageBox.Show(resourceElement.Attribute("name").Value);
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.