XML externo não carrega informações
Pessoal,
Estou com um problema, estou tentando carregar um arquivo XML externo, mas externo mesmo, em outro servidor, e o mesmo não é carregado.
Segue a AS que estou utilizando:
System.useCodepage = true;
xml = new XML();
xml.load("http://rsprime.com.br/temp/bannerCotacao/luta.php");
xml.onLoad = funcao;
xml.ignoreWhite = 1;
function funcao()
{
// Compras
Object(_root).cotacao.compraDolar.text = xml.firstChild.childNodes[0].attributes.compra;
Object(_root).cotacao.compraEuro.text = xml.firstChild.childNodes[1].attributes.compra;
// Vendas
Object(_root).cotacao.vendaDolar.text = xml.firstChild.childNodes[0].attributes.venda;
Object(_root).cotacao.vendaEuro.text = xml.firstChild.childNodes[1].attributes.venda;
}
No lugar das informações aparece "undefined"
Alguém sabe como solucionar este problema?
Discussão (1)
Carregando comentários...