Hi there
Below is a sample XML file.
*******************************
<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>
************************
I want to search the <Info> tag for the word "king" and return the <Name> as output. I know this is simple... :)
But the *order of the <Name> should be in order of the word searched (here it will be king) ie the most numbers will come first.
* *Doc 5 (3 times king) * *Doc 3 (2 times king) * *Doc 2 (1 time king) * * *