J'utilise le YQL Console pour essayer d'interroger un service Web XML REST.Comment interroger un service XML à l'aide de YQL?
J'ai trouvé un service public simple pour jouer avec.
http://www.thomas-bayer.com/sqlrest/CUSTOMER/-151612345/
retours
<CUSTOMER xmlns:xlink="http://www.w3.org/1999/xlink">
<ID>-151612345</ID>
<FIRSTNAME>Deepthi</FIRSTNAME>
<LASTNAME>Deep</LASTNAME>
<STREET>440 - 20th Ave.</STREET>
<CITY>Los Angeles</CITY>
</CUSTOMER>
Si j'utilise la requête:
select *
from xml
where url='http://www.thomas-bayer.com/sqlrest/CUSTOMER/-151612345/'
Je reçois ce code XML retourné. Cependant, si j'essaye de limiter aux données à un seul élément, par exemple:
select *
from xml
where url='http://www.thomas-bayer.com/sqlrest/CUSTOMER/-151612345/'
and xpath='//LASTNAME'
aucun résultat n'est retourné.
Qu'est-ce que je fais mal?
Click here to display the YQL console with the query loaded.