Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
189
rated 0 times [  192] [ 3]  / answers: 1 / hits: 26786  / 14 Years ago, sat, september 4, 2010, 12:00:00

The following code runs very well for this test XML page:



$.get('data/animals.xml', function(xml){
var animals = $.xml2json(xml);
alert(animals.dog[1].name +'/'+ animals.dog[1]);
});


But how can I adapt this code to get the rate data from this European Central Bank page?






Reference:




More From » asp.net

 Answers
12

Try the following. I've tested it on FF 3.6 and Chrome 6, it works.



$.get('data/eurofxref-daily.xml', function(xml) {
var jsonObj = $.xml2json(xml);
alert(jsonObj.Cube.Cube.Cube[0][rate]);
});

[#95705] Wednesday, September 1, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
deonkalvinw

Total Points: 409
Total Questions: 96
Total Answers: 89

Location: Saint Pierre and Miquelon
Member since Sun, Nov 27, 2022
2 Years ago
deonkalvinw questions
Sun, Feb 6, 22, 00:00, 2 Years ago
Tue, Dec 28, 21, 00:00, 2 Years ago
Sun, Aug 22, 21, 00:00, 3 Years ago
Sun, Mar 7, 21, 00:00, 3 Years ago
;