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

  • SEARCH
  • Home
  • 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 1089853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:17:20+00:00 2026-05-16T23:17:20+00:00

How can I gather the data into c# from this xml? I get the

  • 0

How can I gather the data into c# from this xml?
I get the data from :http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml

PS: I would like to get the currencies rates from a web service, bu I could not find a trustworthy web service, thats why I try from xml…

  <?xml version="1.0" encoding="UTF-8" ?> 
- <gesmes:Envelope xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01" xmlns="http://www.ecb.int/vocabulary/2002-08-01/eurofxref">
  <gesmes:subject>Reference rates</gesmes:subject> 
- <gesmes:Sender>
  <gesmes:name>European Central Bank</gesmes:name> 
  </gesmes:Sender>
- <Cube>
- <Cube time="2010-09-17">
  <Cube currency="USD" rate="1.3060" /> 
  <Cube currency="JPY" rate="111.98" /> 
  <Cube currency="BGN" rate="1.9558" /> 
  <Cube currency="CZK" rate="24.680" /> 
  <Cube currency="DKK" rate="7.4468" /> 
  <Cube currency="EEK" rate="15.6466" /> 
  <Cube currency="GBP" rate="0.83575" /> 
  <Cube currency="HUF" rate="282.82" /> 
  <Cube currency="LTL" rate="3.4528" /> 
  <Cube currency="LVL" rate="0.7087" /> 
  <Cube currency="PLN" rate="3.9622" /> 
  <Cube currency="RON" rate="4.2580" /> 
  <Cube currency="SEK" rate="9.2295" /> 
  <Cube currency="CHF" rate="1.3210" /> 
  <Cube currency="NOK" rate="7.9650" /> 
  <Cube currency="HRK" rate="7.2845" /> 
  <Cube currency="RUB" rate="40.4850" /> 
  <Cube currency="TRY" rate="1.9606" /> 
  <Cube currency="AUD" rate="1.3886" /> 
  <Cube currency="BRL" rate="2.2419" /> 
  <Cube currency="CAD" rate="1.3410" /> 
  <Cube currency="CNY" rate="8.7809" /> 
  <Cube currency="HKD" rate="10.1425" /> 
  <Cube currency="IDR" rate="11713.52" /> 
  <Cube currency="INR" rate="59.8530" /> 
  <Cube currency="KRW" rate="1515.90" /> 
  <Cube currency="MXN" rate="16.7075" /> 
  <Cube currency="MYR" rate="4.0512" /> 
  <Cube currency="NZD" rate="1.7940" /> 
  <Cube currency="PHP" rate="57.700" /> 
  <Cube currency="SGD" rate="1.7442" /> 
  <Cube currency="THB" rate="40.153" /> 
  <Cube currency="ZAR" rate="9.3307" /> 
  </Cube>
  </Cube>
  </gesmes:Envelope>
  • 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-16T23:17:21+00:00Added an answer on May 16, 2026 at 11:17 pm

    The first steps would look like:

    var doc = XDocument.Load(source);
    var ns = doc.Root.GetDefaultNamespace();
    
    var topCube = doc.Root.Element(ns+"Cube");
    var timeCube = topCube.Element(ns+"Cube");
    
    string time = timeCube.Attribute("time").Value;
    
    var cubes = from c in timeCube.Elements()
                select new 
                {  Key = c.Attribute("currency").Value, 
                   Value = decimal.Parse(c.Attribute("rate").Value, CultureInfo.InvariantCulture) 
                };
    

    And maybe convert it like this:

    Dictionary<string,decimal> lookup = cubes.ToDictionary(a => a.Key, a => a.Value);
    decimal dollar = lookup["USD"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From what I can gather, there are three categories: Never use GET and use
I keep hearing from associates about grid computing which, from what I can gather,
How can our team gather requirements from our Product Owner in as low friction
From what I gather, Google Chrome can run browser plugins written using NPAPI .
I am loading some XML data, building it into an unordered list and displaying
I've got a web interface from which I will gather user data (username,pass,email,etc..) and
Apologies I can't post any code at this time cos I'm away from my
I have an application where users can select a variety of interests from around
I have a custom developed CMS where users can enter some content into a
I've been looking quite some time today to gather GPS coordinates from a Windows

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.