[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fetching XML for exchange rates into HTTPAPI/EXAMPLE18
Hi,
I am new to this group and have few questions with reference to
HTTPAPI. Please help me out in following situation where I am trying
to get currency exchange rates from Bank of Canada website.
1. I know that the program LIBHTTP/EXAMPLE18 calls the currency
exchange rate web service provided by WebserviceX.net but rates
does not seem consistent with other financial websites. I read the
HTTP POST and GET, and also the XML but did not find any link to
any website e.g Forex.com or www.wallstreetjournal.com where they
actually post the rates. Where these rates are coming from in
program EXAMPLE18?
2. On [1]http://www.webservicex.net/WCF/ServiceDetails.aspx?SID=18,
if a test for currency conversion is invoked (fill out
FromCurrency/ToCurrency and hit Invoke button), it gives out an
XML page (see
[2]http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRat
e)
Even that does not show the actual source for exchange rates.
3. I am working to get exchange rates from website
[3]http://www.bankofcanada.ca/en/rates/exchange-look.html
I modified and successfully compiled the program EXAMPLE18 with this
new website but getting an error when calling the EXAMPLE18
XML parse failed at line 6, col 309: not well-formed (invalid token)
and there is no additional help available.
Here is the complete picture.
I go to Bank of Canada website.
http://www.bankofcanada.ca/en/rates/exchange-look.html.
In "SELECT OPTIONS", I am selecting to get output in HTML, XML and CSV
format.
In "SELECT DATES" I am selecting single date (e.g June 28 2007)
In SELECT CURRENCIES I am selecting US dollar.
When I hit "get rates", I get all the rates. The next page gives me
the rates and also options to see data in XML or CSV format.
Here I have a technical question:
When I click on "this data in XML format", I get XML as below;
----------------------------------------------------------------------
---------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<http://www.bankofcanada.ca/databank/client_output/12156.xml#> -
<Currency xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<http://www.bankofcanada.ca/databank/client_output/12156.xml#> -
<Observation>
<http://www.bankofcanada.ca/databank/client_output/12156.xml#> -
<Currency_name>
US dollars (noon)
<Observation_date>2007-06-28</Observation_date>
<Observation_data>1.0627</Observation_data>
</Currency_name>
</Observation>
</Currency>
----------------------------------------------------------------------
---------------------------------------------
How can we use this output into program EXAMPLE18?
It seems like this schema is not available in SOAP or WSDL (web
services).
Thanks.
Mo
(Mohammad Khan)
_________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect. [4]Join Yahoo!'s
user panel and lay it on us.
References
1. http://www.webservicex.net/WCF/ServiceDetails.aspx?SID=18
2. http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate
3. http://www.bankofcanada.ca/en/rates/exchange-look.html
4. http://us.rd.yahoo.com/evt=48516/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------