🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by 2000rmw Mon, 24 Oct 2016 10:29
wyszukiwanie podobnego wyrazu w xml
#10291
Author: 2000rmw
Date: Mon, 24 Oct 2016 10:29
29 lines
1715 bytes
Witam,
mam następujący, przykładowy plik xml (posortowany wg hasla):
<slownik>
<item>
  <strona>2</strona>
  <haslo>ala</haslo>
</item>
<item>
  <strona>2</strona>
  <haslo>beata</haslo>
</item>
<item>
  <strona>2</strona>
  <haslo>danuta</haslo>
</item>
<item>
  <strona>2</strona>
  <haslo>zygmunt</haslo>
</item>
</slownik>

znalezc "beata" jest prosto:
MyDOM.SelectSingleNode("//item[haslo='beata']")

ale jak znaleźć najbliższe "większe" hasło?

Np. szukam hasła "celina" (którego nie ma w pliku xml) i oczekiwałbym, by został wskazany item z "beata".

Pozdrawiam Robert
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads