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 3699466
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:06:22+00:00 2026-05-19T05:06:22+00:00

I want to load an XML file on the internet into a DataTable in

  • 0

I want to load an XML file on the internet into a DataTable in C#. The XML is loaded from http://rates.fxcm.com/RatesXML and looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<Rates>
    <Rate Symbol="EURUSD">
        <Bid>1.29174</Bid>
        <Ask>1.29198</Ask>
        <High>1.29407</High>
        <Low>1.28723</Low>
        <Direction>-1</Direction>
        <Last>14:56:48</Last>
    </Rate>
    <Rate Symbol="USDJPY">
        <Bid>82.862</Bid>
        <Ask>82.885</Ask>
        <High>83.293</High>
        <Low>82.847</Low>
        <Direction>1</Direction>
        <Last>14:56:47</Last>
    </Rate>
    <!-- More like the above -->
</Rates>

Can I use the ReadXml method of the DataTable class to read the XML, or do I need some kind of http request to get it first into a string?

EDIT:
I’ve just written the following

public DataTable GetCurrentFxPrices(string URL)
{
    DataSet ds = new DataSet("fxPrices");
    ds.ReadXml(URL);

}

and it is trying to read the data, but I am behind a corporate firewall. I’m really clueless now how to get around this. I get this error:

System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.

In firefox I have an HTTP proxy set with a port number. Can I set that somewhere in my app?

  • 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-19T05:06:23+00:00Added an answer on May 19, 2026 at 5:06 am

    Yes, you can use ReadXml if the XML is in a single-table format.

    It may not come in in the format you expect, so you may need to explore the structure of the dataset a bit, but it works just fine.

    As a general rule when loading data from an XML file into a Datatable, I’d read it into a DataSet first and be sure it does not create more than one table. Any nesting int he XML usually results in multiple tables in a DataSet.

    This particular file, however, looks like it would import into a single table just fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.