1
我正在使用YQL Console来试验查询REST XML Web服务。如何使用YQL查询XML服务?
我找到了一个简单的公共服务来玩。
http://www.thomas-bayer.com/sqlrest/CUSTOMER/-151612345/
回报
<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>
如果我使用查询:
select *
from xml
where url='http://www.thomas-bayer.com/sqlrest/CUSTOMER/-151612345/'
我得到这个XML返回。但是,如果我尝试将数据限制为单个元素,例如:
select *
from xml
where url='http://www.thomas-bayer.com/sqlrest/CUSTOMER/-151612345/'
and xpath='//LASTNAME'
未返回任何结果。
我在做什么错?
Click here to display the YQL console with the query loaded.