Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Fala Pessoal !
Estou puxando informações de um XML com a seguinte estrutura:
O Problema é que não estou conseguindo criar a sequencia de Fotos do Imovel utilizando um segundo loop.
imoveis.xml
<?xml version="1.0"?>
<Carga>
<Imoveis>
<Imovel>
<CodigoImovel>A13784</CodigoImovel>
<TipoImovel>Apartamento</TipoImovel>
<Fotos>
<Foto>
<NomeArquivo>050820111641155jqq0d.JPG</NomeArquivo>
<URLArquivo>/imoveis/050820111641155jqq0d.JPG</URLArquivo>
<Principal>1</Principal>
</Foto>
<Foto>
<NomeArquivo>05082011164120wjdtbp.JPG</NomeArquivo>
<URLArquivo>/imoveis/05082011164120wjdtbp.JPG</URLArquivo>
<Principal>0</Principal>
</Foto>
<Foto>
<NomeArquivo>0508201116411522zxi2.JPG</NomeArquivo>
<URLArquivo>/imoveis/0508201116411522zxi2.JPG</URLArquivo>
<Principal>0</Principal>
</Foto>
<Foto>
<NomeArquivo>05082011164118umwera.JPG</NomeArquivo>
<URLArquivo>/imoveis/05082011164118umwera.JPG</URLArquivo>
<Principal>0</Principal>
</Foto>
<Foto>
<NomeArquivo>05082011164118u0xavb.JPG</NomeArquivo>
<URLArquivo>/imoveis/05082011164118u0xavb.JPG</URLArquivo>
<Principal>0</Principal>
</Foto>
</Fotos>
</Imovel>
</Imoveis>
</Carga>
ler_imoveis.asp
<%@ language = "VBScript" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Ler Imoveis</title>
</head>
<body>codigoImovel = registro.item(i).selectSingleNode("./CodigoImovel").text
tipoImovel= registro.item(i).selectSingleNode("./TipoImovel").text
response.write "Codigo: " & codigoImovel & "<BR>Tipo: " & tipoImovel & "<BR>"
//Aqui que não estou conseguindo puxar todas as fotos de nó, ele só puxa a primeira.
fotosImovel = registro.item(i).selectSingleNode("./Fotos/Foto/URLArquivo").text
response.write "<img src=""" & fotosImovel & """ width=""100"" heith=""100""/><BR><BR><BR> "
next
%>
</body>
</html>
Quem puder me ajudar, agradeço !!!
Abs !!
Carregando comentários...