Forum Pplware
vbscript read xml -- HELP - Versão de Impressão

+- Forum Pplware (http://forum.pplware.com)
+-- Fórum: Mais Tech (/forumdisplay.php?fid=11)
+--- Fórum: Programação e Web (/forumdisplay.php?fid=16)
+--- Tópico: vbscript read xml -- HELP (/showthread.php?tid=3658)



vbscript read xml -- HELP - karlos - 31-10-2009 00:08

Oi malta,
Alguem me pode dar uma ajuda, como posso ler os valores em vbscript.
Como por exemplo o valor da tag:
"//xml_api_reply/weather/forecast_information/city"
Obrigado


<?xml version="1.0" ?>
- <xml_api_reply version="1">
- <weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0">
- <forecast_information>
<city data="Oporto, Porto" />
<postal_code data="porto" />
<latitude_e6 data="" />
<longitude_e6 data="" />
<forecast_date data="2009-10-25" />
<current_date_time data="2009-10-25 16:00:00 +0000" />
<unit_system data="US" />
</forecast_information>
- <current_conditions>
<condition data="Fog" />
<temp_f data="66" />
<temp_c data="19" />
<humidity data="Humidity: 100%" />
<icon data="/ig/images/weather/fog.gif" />
<wind_condition data="Wind: N at 4 mph" />
</current_conditions>
- <forecast_conditions>
<day_of_week data="Sun" />
<low data="59" />
<high data="71" />
<icon data="/ig/images/weather/chance_of_rain.gif" />
<condition data="Chance of Rain" />
</forecast_conditions>
- <forecast_conditions>
<day_of_week data="Mon" />
<low data="60" />
<high data="73" />
<icon data="/ig/images/weather/mostly_sunny.gif" />
<condition data="Mostly Sunny" />
</forecast_conditions>
- <forecast_conditions>
<day_of_week data="Tue" />
<low data="60" />
<high data="73" />
<icon data="/ig/images/weather/cloudy.gif" />
<condition data="Cloudy" />
</forecast_conditions>
- <forecast_conditions>
<day_of_week data="Wed" />
<low data="62" />
<high data="73" />
<icon data="/ig/images/weather/mostly_sunny.gif" />
<condition data="Mostly Sunny" />
</forecast_conditions>
</weather>
</xml_api_reply>


RE: vbscript read xml -- HELP - psimoes - 01-11-2009 01:20

Tenta ver um dos exemplos abaixo:

http://www.visualbasicscript.com/m37404.aspx

http://www.w3schools.com/dom/dom_examples.asp