下面是一個示例XML文件。根據特定單詞的數量進行搜索
<Docs>
<Doc>
<Name>Doc 1</Name>
<Info>Hurray</Info>
</Doc>
<Doc>
<Name>Doc 2</Name>
<Info>Brinjal is king of vegetables.</Info>
</Doc>
<Doc>
<Name>Doc 3</Name>
<Info>Alexandar was a great king. His desire was to conquer the world and rule the world as a king.</Info>
</Doc>
<Doc>
<Name>Doc 4</Name>
<Info>I love cherries.</Info>
</Doc>
<Doc>
<Name>Doc 5</Name>
<Info>Mango is king of fruits. Alphonso is king of mangoes. So Alphonso is king's king.</Info>
</Doc>
</Docs>
我想搜索單詞「king」的標籤並返回輸出。我知道這很簡單... :)
但是,順序應該是按照搜索到的單詞順序(這裏將是國王),即大部分數字會先到達。
文件5(3次國王) 文件3(2次國王) 文檔2(1次國王)
drikk-你是正確的WRT BaseX – John
drikk-但是,我認爲'where'條款應該來了'訂單之前by' – John
你是對的。有趣的是,它也可以在''where''之前的'by by'執行BaseX。 – dirkk