Einzelnen Beitrag anzeigen

mjustin

Registriert seit: 14. Apr 2008
3.005 Beiträge
 
Delphi 2009 Professional
 
#6

Re: REST, web servcies und delphi

  Alt 9. Apr 2009, 14:42
Zitat von r_amse_s:
hmmm, das Ergebnis ist leider nicht xml
wie könnte ich das parsen?

Delphi-Quellcode:
<ResultSet xsi:schemaLocation="urn:yahoo:maps http://api.local.yahoo.com/MapsService/V1/TrafficDataResponse.xsd">
<LastUpdateDate>1239226270</LastUpdateDate>

<Result type="incident">
<Title>Disabled vehicle, on I-280 SB at MAGDALENA AVE</Title>
<Description>Disabled Vehicle</Description>
<Latitude>37.351799</Latitude>
<Longitude>-122.106087</Longitude>
<Direction>SB</Direction>
<Severity>2</Severity>
<ReportDate>1239216918</ReportDate>
<UpdateDate>1239224608</UpdateDate>
<EndDate>1239226432</EndDate>
</Result>
</ResultSet>
Es ist alles da, was XML braucht, und sogar ein XSD Verweis. Was sagt denn der Parser, gibt es eine Fehlermeldung? Falls die optionale XML-Deklaration vermisst wird, kann man

<?xml version="1.0"?>

vor den Inhalt setzen. (siehe http://de.wikipedia.org/wiki/XML-Deklaration)
Michael Justin
habarisoft.com
  Mit Zitat antworten Zitat