当我使用下面的 XQuery 时,我什么也得不到或“错误 XQDY0025”。但是,eXide 显示“Found 4 in 0.004s”,请帮帮我,我找不到问题所在。
for $s in doc("customers.xml")/customers/Customer
return $s/@Name
Name
从下面的 XML 文档中查询属性:
<customers>
<Customer Name="c2">
<Order OrderNumber="o1">
<Item Description="ab">i1</Item>
</Order>
</Customer>
<Customer Name="c3">
<Order OrderNumber="o2">
<Item Description="cd">i2</Item>
<Item Description="ef">i3</Item>
</Order>
<Order OrderNumber="o2">
<Item Description="cfg">i5</Item>
</Order>
</Customer>
<Customer Name="c1">
<Order OrderNumber="o1">
<Item Description="abc">i1</Item>
<Item Description="def">i2</Item>
</Order>
</Customer>
<Customer Name="c4">
<Order OrderNumber="o1">
<Item Description="abc">i1</Item>
</Order>
<Order OrderNumber="o2">
<Item Description="def">i2</Item>
</Order>
</Customer>
</customers>