【发布时间】:2011-10-19 09:17:52
【问题描述】:
我正在使用YQL Console 来试验查询 REST XML Web 服务。
我找到了一个简单的公共服务。
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.
【问题讨论】:
标签: xml web-services rest yql