Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4085654
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:36:37+00:00 2026-05-20T18:36:37+00:00

I have two xml files, one of them is dev.xml which has this code

  • 0

I have two xml files, one of them is dev.xml which has this code

 <mapping>
  <character>अ</character>
  <itrans>a</itrans>
</mapping>

the second file is guj.xml

  <mapping>
  <character>અ</character>
  <itrans>a</itrans>
  <mapping>

i need to access these xml files and store the characters in an two dimensional array in global.asa!! i am using C# visual studio 2008!! thanks!!

I HAVE DONE THINGS SO FAR

        sbyte[,] a = new sbyte[100, 100];
        sbyte[,] b = new sbyte[100, 100];
        int count = 0;
        XDocument xmlDoc = XDocument.Load("dev.xml");
        while (!eof)
        {
            if (documentcontent.childnode == "true")
                count = count + 1;
        }

         for(int i=0;i<count;i++)
        {
             for(int j=0;j<count;j++)
             {
                 if(j==0)
                 a[i][j]=documentcontent.childnode.childnode[0].data;
                 else
                     a[i][j]=documentcontent.childnode.childnode[1].data;
             }

         }

IS the END OF FILE c ondition correct? i am getting an error!! how to use end of file in c#?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:36:37+00:00Added an answer on May 20, 2026 at 6:36 pm

    This should help you out:

    XElement xdoc = XElement.Load("dev.xml");
    var myMapping = xdoc.Descendants("mapping")
                        .ToDictionary(x => x.Element("character").Value, 
                                      x => x.Element("itrans").Value);
    

    This assumes this XML structure for dev.xml (added outer element mappings so you can store multiple mapping elements:

    <mappings>
      <mapping>
        <character>अ</character>
        <itrans>a</itrans>
      </mapping>
      <mapping>
        <character>foo</character>
        <itrans>bar</itrans>
      </mapping>
    </mappings>
    

    You can use it like:

    string itrans = myMapping["foo"]; //returns bar
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two XML files to render one page in XSLT. This is because
I have an xml file like this: <root> <item> <name>one</name> <status>good</status> </item> <item> <name>two</name>
I have two XML files with two different XSD schemas and different namespaces. They
I have two XML files. They are similar, but there are two nodes of
I have two XML sources to retrieve data from. I want to use them
I have built two XML files that map the content of a given folder:
I have an xml file right now which has a TableLayout within a LinearLayout.
I have written two simple Java classes (one of them containing main(), and the
I have a big (1.9 GB) XML file which has data I want to
I have two applications written in Java that communicate with each other using XML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.