要求:
直接通过索引解析,不想打开文档(因此,不考虑FLOWR表达式)。
搜索结果返回采购订单文档列表
采购订单可能有或没有订单项(出于示例目的)
示例文档1:
<purchase-order>
<line-items>
<line-item type="lamp" amount="3500"></line-item>
<line-item type="couch" amount="50000"></line-item>
<line-item type="chair" amount="40000"></line-item>
</line-items>
<other-stuff></other-stuff>
</purchase-order>
Sample document 2:
<purchase-order>
<line-items>
<line-item type="couch" amount="10000"> </line-item>
<line-item type="chair" amount="80000"></line-item>
</line-items>
<other-stuff></other-stuff>
</purchase-order>
预期结果顺序: