XML Reader

Joined
Aug 20, 2009
Messages
2
Reaction score
0
I don't have a lot of experience with xml files. I am trying to read the string "English Version" from the XML below in C# given:
"BUTTON_TEXT" and ""en"

Does anyone know how to write a method passing the 2 variables above to get the result = "English Version" ?


<?xml version="1.0" encoding="UTF-16"?>
<localization>
<metadata>
<version number="1.0">
<date>2009-07-26</date>
<comment/>
</version>
<languages>
<language lcid="1033" code="en">US English</language>
<language lcid="1034" code="de">German</language>
</languages>
</metadata>
<descriptions>
<string key="{NLS_KEY}">
<locale code="en">NLS value</locale>
<locale code="de">NLS wert</locale>
</string>
<string key="BUTTON_TEXT">
<locale code="en">English Version</locale>
<locale code="de">German Version</locale>
</string>
</descriptions>
</localization>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top