mtin - Mi 02.05.07 20:25
Titel: [XML/RSS] Attribut auslesen will nich klappen -.-
Hallo, ich versuche hier verzweifelt ein Attribut auszulesen und es will und will nich klappen -.-
xml:
XML-Daten
1: 2: 3: 4: 5: 6:
| <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <rss version="2.0" xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"> <channel> <yweather:condition text="Fair" code="33" temp="7" date="Tue, 01 May 2007 10:20 pm CEST" /> </channel> </rss> |
(gekürtzt)
code:
Delphi-Quelltext
1: 2: 3:
| xmldoc.LoadFromXML(weather); xmldoc.Active:=true; value:=xmldoc.DocumentElement.ChildNodes['channel'].ChildNodes['yweather:condition'].GetAttributeNS('temp',''); |
aber es kommt nur immer sowas wie kann nicht "null" in "string" konvertieren :(
was ist denn da nur los?