AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Attribut auslesen..

Ein Thema von mtin · begonnen am 1. Mai 2007 · letzter Beitrag vom 3. Mai 2007
 
Benutzerbild von mtin
mtin

Registriert seit: 8. Jun 2005
34 Beiträge
 
#9

Re: Attribut auslesen..

  Alt 2. Mai 2007, 12:33
hm...danke das ihr euch alle solche Mühe macht, aber es geht trotzdem nicht

Result bleibt leer...

hier mal der Komplette Quelltext, einfach ein TXMLDocument aufs Form geknallt und dann müsste das doch gehen

Delphi-Quellcode:
function getWeather():string;
var weatherCheck:TidHTTP;
weather:string;
xnChannel, xnCondition: IXMLNode;
begin

try
  weatherCheck := TidHTTP.Create;
  //http://xml.weather.yahoo.com/forecastrss?p=GMXX1930&u=c
  weather := weatherCheck.Get('http://xml.weather.yahoo.com/forecastrss?p=GMXX1930&u=c');

  Form1.xmldoc.LoadFromXML(weather);
  Form1.xmldoc.Active:=true;
  xnChannel := Form1.xmldoc.DocumentElement.ChildNodes['channel'];
  xnCondition := xnChannel.ChildNodes['condition'];
  result := VarToStr(xnCondition.Attributes['temp']);

  weatherCheck.Free;
except
  result := 'could not retrieve weather data';
end;

end;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:52 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz