XML Reader

Discussion in '.NET' started by eksilva, Aug 20, 2009.

  1. eksilva

    eksilva

    Joined:
    Aug 20, 2009
    Messages:
    2
    Likes Received:
    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>
     
    eksilva, Aug 20, 2009
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.